[Lazarus] Debugging code with interfaces

Juha Manninen juha.manninen at phnet.fi
Sun Apr 25 14:36:17 CEST 2010


Mattias Gärtner schrieb:

> 1. If the bounds are changed after the form became visible, you will see 
> flicker. Some widgetsets/windowmanagers combines them and you can not 
> see it. I heard that this is often the case under windows. But see 
> Martin's Mail, he sees every window move as flicker. Maybe that is why 
> the VCL didn't fix it. That's why OnResize comes before OnShow in LCL.

I understand that window creation is a somewhat special case. It could 
be solved in special handling of the Visible property, that should be 
honored only after any other initialization. I.e. Visible could be 
decoupled from Show, indicating the *designed* state, to be honored when 
nothing else is left to do.


> 2. OnResize is often used to resize controls. So triggering it after 
> real resize would trigger another real resize. That would cause flicker.

That's why I suggested a two-pass resize. I have no idea how it would 
affect Delphi compatibility, though. OnResize could be split into two 
handlers, OnBeforeResize (or OnQueryResize) and OnAfterResize, called in 
either pass. When only a single OnResize handler exists, it will be 
called in both passes, but programmatical changes to the size should be 
ignored in the second pass.

DoDi





More information about the Lazarus mailing list