[Lazarus] Strange behaviour of TCustomEditButton ancesters

Frans fjf.vanleeuwen at quicknet.nl
Sat Mar 12 21:20:15 CET 2016

I do understand what you mean, but I do not think that is th case.
I send my test program, it's very simple.

Frans van Leeuwen
M 06-51695390

Op 12-03-2016 om 20:59 schreef Martin Frb:
> On 12/03/2016 19:38, Frans wrote:
>> Hi
>> I use TFileNameEdit (but TDirectoryEdit acts the same) on the second tabsheet of a PageControl 
>> where it's the first control to receive focus. I set the focus manually in the method 
>> form.tabshow for the event OnShow.
>> The first time I activate that tab, SetFocus has the effect as shown in FirstTime.png. When I 
>> select the tab another time, the effect is normal, as shown in Second time.png.
>> Is can't find out why. Is this a bug? I use Lazarus 1.6 and FCP 3.0.0.
> I dont have the "how to fix", but it looks like the first time you call SetFocus is before the tab 
> got created, (or at least before it gets its true size). At that time the tab will have a dummy 
> size (maybe 200 pixel width).
> The SetFocus may or may not create those handles, but the size is likely not yet set. So the 
> content of the edit is "scrolled".
> It could also be, that it is created, but the autosize lock is still on, deferring the initial 
> resize.
> -- 
> _______________________________________________
> Lazarus mailing list
> Lazarus at lists.lazarus.freepascal.org
> http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

-------------- next part --------------
A non-text attachment was scrubbed...
Name: FileNameEdit.zip
Type: application/x-zip-compressed
Size: 2354 bytes
Desc: not available
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20160312/c7a75d43/attachment-0003.bin>

More information about the Lazarus mailing list