[lazarus] ComboBox problems
marc.weustink at cuperus.nl
Fri Aug 15 06:42:18 EDT 2003
+ From: Mattias Gaertner [mailto:nc-gaertnma at netcologne.de]
+ Sent: vrijdag 15 augustus 2003 12:29
+ On Fri, 15 Aug 2003 11:25:46 +0200
+ "Marc Weustink" <marc.weustink at cuperus.nl> wrote:
+ > + > Mattias Gaertner wrote:
+ > + > > What about this:
+ > + > > TWinControl already uses DoConstrainedResize before resizing.
+ > + > > We can add a function, which asks the interface to apply
+ > + > > interface specific constraints, before resizing occurs.
+ > I think the interface doesn't always know this, so there should be a
+ > general"handling" anyhow. In case of a working general handling, I
+ > see the need for extra case specific functionality in the LCL.
+ You are right. There is no real need.
+ It is only for optimization and avoiding circles.
+ For example, when the user changes the width of a vertical
+ scrollbar to 20, the LCL will automatcially resize all
+ aligned controls and then it sends the setsize message to
+ the interface. The gtk ignores the width change and sets
+ the width to say 14 and sends a size message back.
+ Then the LCL resizes the aligned controls again.
Hmm... that makes sense. I didn't realize that alligning will be done
before the interface knows about it.
+ If we add an interface constraint function, the SetBounds (ChangeBounds)
+ method would first ask the interface to apply some constraints. The gtk
+ interface knows in this case, that a vertical scrollbar has a fixed size
+ will change the width. Then the auto aligning of the LCL occurs. And
+ Under the gtk interface you will not see any acceleration, because of
+ caching. But it will surely make it easier for the win32 intf and
+ other yet to come interfaces.
+ So, although this function is rarely used and it is not really needed,
+ reduces some overhead.
OK, good idea. I see the fun of it.
More information about the Lazarus