Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
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 Go to previous messageGo to previous message
jerson is currently offline  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

 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Layout call procedure buggy for invisible controls?
Next Topic: Problem with Calendar control
Goto Forum:
  


Current Time: Sun Apr 27 20:04:26 CEST 2025

Total time taken to generate the page: 0.02170 seconds