Home » U++ Library support » U++ Widgets - General questions or Mixed problems » How can I detect Button press / release
Re: How can I detect Button press / release [message #29494 is a reply to message #29486] |
Sun, 24 October 2010 04:18   |
jerson
Messages: 202 Registered: June 2010 Location: Bombay, India
|
Experienced Member |

|
|
Hi Koldo
I'm a bit fuzzy on this one. Can you help me a bit more as to how to do this? This is how I did it now
class JfButton : public Button {
public:
virtual void LeftDown(Point, dword);
virtual void LeftUp(Point, dword);
};
and in my App, this
void JfButton::LeftDown(Point p, dword dw)
{
SetLabel("Pushed");
}
void JfButton::LeftUp(Point p, dword dw)
{
SetLabel("Released");
}
I understand Honza's point about releasing the button outside the widget rectangle and can see it hang. Surely I need to look at how to release when the Mouse leaves the widget rectangle.
Edit:
I no longer see the button being redrawn to pushed state. Is there something more that needs to be done to get this?
Regards
[Updated on: Sun, 24 October 2010 04:25] Report message to a moderator
|
|
|
Goto Forum:
Current Time: Sun Apr 27 10:30:53 CEST 2025
Total time taken to generate the page: 0.00865 seconds
|