[lazarus] You can get onresize BEFORE onshow...

Mattias Gaertner nc-gaertnma at netcologne.de
Mon Sep 29 08:09:04 EDT 2003


On Sat, 27 Sep 2003 12:53:37 -0500
Tony <tony at maro.net> wrote:

> Blew my mind, but this explains a random bug that has bothered me for 
> almost a year.
> 
> In GTK with certain form positionings defined, a form resize event _can_ 
> (not always) be triggered before the form's onshow, but after the
> oncreate.
> 
> Since I was creating components in the onshow and then using them in 
> onresize this kind of caused me problems.  Initially I did this because 
> of a bug in Lazarus which has long-since been fixed, but never moved the 
> creation code.
> 
> Specifically on _some_ systems this will happen every time if the form's 
> position is set to "poscreencenter" and on other systems happens 
> everytime if set to "podesktopcenter" but generally if it does it on one 
> position type it does NOT do it on the other.
> 
> Not really a bug, I guess, just a "that's odd".

Note: Many events come directly from the interface and the LCL does not
reorder events (except some special cases). Applications should react to
events.

But you are right, there should be no difference between "poscreencenter"
and "podesktopcenter". Can you send me an example. I don't know, when I will
have time to fix it. But it won't be lost.


Mattias






More information about the Lazarus mailing list