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