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 » Simulate a button click
Re: Simulate a button click [message #37487 is a reply to message #37454] Wed, 10 October 2012 22:13 Go to previous messageGo to previous message
Mircode is currently offline  Mircode
Messages: 17
Registered: September 2012
Promising Member
Inspired by this http://www.ultimatepp.org/forum/index.php?t=msg&th=6949& amp;start=0& I found a way:

The PseudoPush method is defined in Button.cpp and is actually very simple.

void Pusher::PseudoPush() {
	if(IsReadOnly() || !IsEnabled()) return;
	KeyPush();
	Sync();
	Sleep(50);
	FinishPush();
}


Now I created my own class, which offers the PseudoDown and the PseudoUp method.

class MyButton:public Button{
public:
    MyButton() {}
    ~MyButton() {}

	void PseudoDown(){
		if(IsReadOnly() || !IsEnabled()) return;
		KeyPush();
		Sync();
	}
	void PseudoUp(){
		FinishPush();
	}    
};


Works fine Smile
 
Read Message
Read Message
Read Message
Previous Topic: QTF tooltip on tray icon.
Next Topic: Change window style
Goto Forum:
  


Current Time: Sat Jun 08 13:37:26 CEST 2024

Total time taken to generate the page: 0.02425 seconds