Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2000-05

TSpeedbutton's

3 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Marc Weustink
to Shane Miller: I am struggling. Can anyone explain something to me. For the TSpeedbutton's I'm not…
Marc Weustink wrote 12 lines
+ From: Shane Miller + + Argh, [--8<-- SNIP --8<-- SNIP --8<-- SNIP --8<--] + I continue to get MOUSEMOVE meassages until I leave the + button. After I leave, I no longer get the messages so I no + longer can set it UP again. If I recall it correctly you've set the MouseCapture on the button down. This way you always get mouseevents regardingless where you are.

This is not correct, it only counts for MouseUp and Down

+ I'm confused and tired of someone else + please take a look and see what I'm doing wrong. Don't know if Capturing already is implemented, if not I'll 't OK. It uses gtk_grab, this one also grabs the keyboard. The windows

capture only captures the mouse. I changed it to gdk_grab.

+ Do I need to send a WMCANCELMODE message to set the button up?

After some investigations where the CM_MouseEnter and CM_MouseLeave are generated, they appeared in the Application.Idle loop. I started implementing this through gtk_idle_add and a OnIdle event property of the InterfaceBase, but didn't finish

Marc

Reply by email

Marc Weustink
to Shane Miller: I am struggling. Can anyone explain something to me. For the TSpeedbutton's I'm not…

+ From: Shane Miller
+
+ Argh,

[--8<-- SNIP --8<-- SNIP --8<-- SNIP --8<--]

+ I continue to get MOUSEMOVE meassages until I leave the
+ button. After I leave, I no longer get the messages so I no
+ longer can set it UP again.

If I recall it correctly you've set the MouseCapture on the button down. This way you always get mouseevents regardingless where you are.

So the moment you get a mouse move *Outside* the control you can set up and release the mousecapture.

+ I'm confused and tired of someone else
+ please take a look and see what I'm doing wrong.

Don't know if Capturing already is implemented, if not I'll look at it.

+ Do I need to send a WMCANCELMODE message to set the button up?

Naaahhh...

Marc

Reply by email

Shane Miller

Argh,

I am struggling. Can anyone explain something to me.

For the TSpeedbutton's I'm not getting the button to return to it's normal state (FLAT if FLAT is true) when I leave it.

I get the MOUSELEAVE message sometimes, but not others. I am not sure what the problem is because I'm not sure the exact flow that is supposed to be happening.

When I enter the button, the TWincontrol actually gets the MOUSEMOVE message. I do a ControlAtPos to see if there is a non-windowed control at that position. If so, I pass the MOUSEMOVE message on to it.

In Speedbutton I get the mousemove message and because FMOUSEINCONTROL is false I know I just entered it.
I set FMOUSEINCONTROL to TRUE an I call the PAINT procedure. If it's fFlat is true, I set the FState to bsDown and I paint it accordingly.

I continue to get MOUSEMOVE meassages until I leave the button. After I leave, I no longer get the messages so I no longer can set it UP again.

I'm confused and tired of someone else please take a look and see what I'm doing wrong. Do I need to send a WMCANCELMODE message to set the button up? If so, from where?

Thanks
Shane

Reply by email