Hello, I tested the patch from Flávio + correction from Juha in Linux+Qt. Anchoring now works well (especially right anchoring). I tested it also as a grid cell editor: procedure TForm1.StringGrid1SelectEditor(Sender: TObject; aCol, aRow: Integer; var Editor: TWinControl); var aRect: TRect; begin EditButton1.Parent:=StringGrid1; aRect:=StringGrid1.CellRect(aCol, aRow); dec(aRect.Right, EditButton1.ButtonWidth); //correction that it will fit to a cell EditButton1.BoundsRect:=aRect; Editor:=EditButton1; end; There only one issue: If I click button of stand-alone EditButton then the Edit part keeps focus. If I click button of cell-editor EditButton then the Edit part losts focus. Thanks Vojtech aka Blaazen ______________________________________________________________
Od: "Juha Manninen" <juha.mannine...@gmail.com> Komu: Lazarus mailing list <lazarus@lists.lazarus.freepascal.org> Datum: 19.03.2013 11:00 Předmět: Re: [Lazarus] TEditButton alignment
On Tue, Mar 19, 2013 at 9:48 AM, Juha Manninen <juha.mannine...@gmail.com> wrote:
It does not compile here. It complains about BiDiMode in TEditButtonSpacing.GetSpaceAround.
Ok, I changed it as below and it works. I don't know how you tested the broken code but it looks very nice. No widgetset code and the component inherits from TCustomEdit. The code is also clean, no ugly hacks. Why didn't you show it earlier? Regards Juha -- _______________________________________________ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus <http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus>
-- _______________________________________________ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus