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 » ButtonOption has no disabled state? [solved w/ ::Disable()]
ButtonOption has no disabled state? [solved w/ ::Disable()] [message #11908] Sun, 30 September 2007 21:43 Go to next message
Mindtraveller is currently offline  Mindtraveller
Messages: 917
Registered: August 2007
Location: Russia, Moscow rgn.
Experienced Contributor

Got ButtonOption control on my layout. Say, it`s called stopButton.
I want to make it disabled (grayed and not responding to user input).

None of this:
  • stopButton.SetEditable(false);
  • stopButton.SetReadOnly();

worked.

How to make ButtonOption disabled?

P.S. Looked into sources:
void  ButtonOption::LeftDown(Point, dword) {
	push = true;
	Refresh();
}
And it seems like there`s no checking for enabled/disabled state.

[Updated on: Sun, 30 September 2007 22:04]

Report message to a moderator

Re: ButtonOption has no disabled state? [message #11909 is a reply to message #11908] Sun, 30 September 2007 21:47 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
Mindtraveller wrote on Sun, 30 September 2007 15:43

Got ButtonOption control on my layout. Say, it`s called stopButton.
I want to make it disabled (grayed and not responding to user input).

None of this:
  • stopButton.SetEditable(false);
  • stopButton.SetReadOnly();

worked.

How to make ButtonOption disabled?

P.S. Looked into sources:
void  ButtonOption::LeftDown(Point, dword) {
	push = true;
	Refresh();
}
And it seems like there`s no checking for enabled/disabled state.


It does not need to check because disabled widgets do not get events.

stopButton.Disable();

Mirek
Re: ButtonOption has no disabled state? [message #11910 is a reply to message #11909] Sun, 30 September 2007 21:57 Go to previous messageGo to next message
Mindtraveller is currently offline  Mindtraveller
Messages: 917
Registered: August 2007
Location: Russia, Moscow rgn.
Experienced Contributor

Thanx, it works.
It seems like I looked into read-only state instead of disabling control.
Re: ButtonOption has no disabled state? [message #11912 is a reply to message #11910] Sun, 30 September 2007 22:58 Go to previous message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
The difference between two is that ReadOnly is still active.

Applies e.g. to EditField - you can still select and copy data from it.

Disable/Enable is much "lower" kind of state, implemented at "CtrlCore" level. Usually, it has to be reflected in Paint only.
Previous Topic: Is there an equivalent of win32 API "SendMessage" in U++
Next Topic: Toolbar clears after ESC key [solved, it`s the bug in user code]
Goto Forum:
  


Current Time: Thu Apr 25 11:38:59 CEST 2024

Total time taken to generate the page: 0.02682 seconds