[lazarus] some questions about design
Marc Weustink
Marc.Weustink at cuperus.nl
Mon Jan 3 04:55:53 EST 2000
+ From: Stefan Hille [mailto:stoppok at osibisa.ms.sub.org]
+
+ Hi,
+
+ hope you've all recovered now from your millenium parties;-)
:-)
+ Ok, here some things I've noticed during the last days of development:
+
+ - There's a problem with all classes derived from TGraphicControl.
+ (currently these are TPaintBox and TBevel).
+ The problem is, that there are a lot of places where these
+ are casted to TWinControl, although TGraphicControl is
+ derived from TControl.
Hmm... odd, I first thought this was an historical point, but since the
introduction (1.15) is had been derived from TControl. I think these casts
should be altered.
+ any suggestions how to solve this?
+
+ - TCheckBox is quite OK now, but if you assign OnClick and
+ try to find out if the object is checked/unchecked you'll get
+ the wrong state. Seems as if GTK is calling the handler before
+ it actually changes the state.
It looks like the state is changed on a keyup instead of a key down
The order of events is currently
LM_[KEY|BUTTON]DOWN : triggered by gtk event
LM_[CHAR|CLICK] : generated after down
LM_[KEY|BUTTON]UP : triggered by gtk event.
Hmmm... I just did some experiments in Delphi and it seems that I generate
the click event to early. It should be part of XXXUP and not XXXDOWN. I'll
fix that tonight.
+ - I'm not sure about it but it seems to me as if some controls (e.g.
+ TCustomForm) don't recognize if their visual representation changes.
+ For example if you resize a form the width/height properties won't get
+ updated.
+ Could anybody please check this.
Noticed that before. Could be caused by the recent change of messages. For
me it had a low priority, but if somebody else can look after it...
+ - To keep the properties of TTrackBar / TCheckBox up to date
+ I introduced some messages (LM_GETCHECKBOX...) which will
+ sync the state of the lazarus object with that one of the
+ GTK library. I think that we'll need more of these messages
+ in the future and I'd like to create one special
+ message for this. In the gtk interface we could then make a
+ new procedure which makes a "case fCompStyle of". Thus we
+ could avoid a lot of different messages.
+ Any comments?
You mean a message like LM_UPDATEVALUES ??? Sounds ok for me.
Marc
More information about the Lazarus
mailing list