[lazarus] Speedbutton questions

Shane Miller SMiller1 at stvgb.org
Fri Mar 10 13:33:48 EST 2000

TSpeedbutton is a TGraphicControl and therefore not a TWinControl.

If there isn't a gtk widget (or somoething) that is receiving signals how does this control get them?  
I see the CM_MOUSEENTER and CM_MOUSELEAVE are "perform"ed  via the function UpdateTracking whcih gets called from MOUSEMOVE procedure.  But the MouseMove function will never get called if there isn't a control that can attach a signal to the mousemove signal.  Should we create an eventbox for this widget?  I would prefer not to because then we would have to add a "handle" property or something to TSpeedbutton for storing the widget.

I was thinking that the form would get the mousemove and check to see if the mouse was over another control otherthan itself and pass the mousemove to it, but that seems to be a bad way of doing it.

For example, I add a Speedbutton to the notebook page[0].  When the page gets a signal for mousemove, the mouse could be over the speedbutton because it doesn't get it's own messages so they are being passed to the parent.  The parent would have to check to see if the mouse X,Y coords were over anoth control and call that control's mousemove procedure.

To handle the paint would be similiar except the parent would tell all children to repaint.  This is currently handled within gtk but if they don't have a gtkwidget associated with them, then they don't get paint messages either....

I'll continue to look at it but would appreciate some info from others...

>>> Marc.Weustink at cuperus.nl 03/10/00 11:59AM >>>
+ but, how does a PAINT occur?
+ How does it get called?  gtk usually calls it via the signal
+ (expose, resize, etc) but in this case it doesn't get called.

If I recall it correctly, that's part of TWinControl. If it doesn't get a
LM_Paint event I'll look at that.
Ill let you know.


     To unsubscribe: mail lazarus-request at miraclec.com with
                "unsubscribe" as the Subject
    archives at http://www.miraclec.com/list_archives/lazarus

More information about the Lazarus mailing list