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 » DropList proposal
DropList proposal [message #25918] Fri, 19 March 2010 20:37 Go to next message
Mindtraveller is currently offline  Mindtraveller
Messages: 917
Registered: August 2007
Location: Russia, Moscow rgn.
Experienced Contributor

I've noticed that if DropList has any SubButtons and it's parent control is disabled, it's buttons still look enabled. I tried adding these lines to public section of DropList, but it didn't help:
	void          Enable (bool enable = true)           {for(int i=0;i<GetButtonCount();++i) GetButton(i).Enable(enable); Ctrl::Enable(enable);}
	void          Disable()                             {Enable(false);}

[Updated on: Fri, 19 March 2010 20:38]

Report message to a moderator

Re: DropList proposal [message #25919 is a reply to message #25918] Fri, 19 March 2010 21:22 Go to previous messageGo to next message
tojocky is currently offline  tojocky
Messages: 607
Registered: April 2008
Location: UK
Contributor

Maybe refresh method of Ctrl work?

If you want to re-enable drop list the the state of ctrls need to change to initial state!

Mindtraveller wrote on Fri, 19 March 2010 21:37

I've noticed that if DropList has any SubButtons and it's parent control is disabled, it's buttons still look enabled. I tried adding these lines to public section of DropList, but it didn't help:
	void          Enable (bool enable = true)           {for(int i=0;i<GetButtonCount();++i) GetButton(i).Enable(enable); Ctrl::Enable(enable);}
	void          Disable()                             {Enable(false);}


[Updated on: Fri, 19 March 2010 21:23]

Report message to a moderator

Re: DropList proposal [message #25964 is a reply to message #25919] Mon, 22 March 2010 14:57 Go to previous messageGo to next message
Mindtraveller is currently offline  Mindtraveller
Messages: 917
Registered: August 2007
Location: Russia, Moscow rgn.
Experienced Contributor

tojocky wrote on Fri, 19 March 2010 23:22

Maybe refresh method of Ctrl work?
No, it doesn't.

tojocky wrote on Fri, 19 March 2010 23:22

If you want to re-enable drop list the the state of ctrls need to change to initial state!
Actually I want to disable additional SubButtons when I disable DropList.

I hope someone who knows how Ctrl is drawn when it's parent is disabled will tell how to disable DropList SubButtons.
Re: DropList proposal [message #26068 is a reply to message #25964] Mon, 29 March 2010 13:14 Go to previous messageGo to next message
mrjt is currently offline  mrjt
Messages: 705
Registered: March 2007
Location: London
Contributor
Patch. Change this:
if(!IsEnabled() || i >= 0 && !button[i].enabled)
    return CTRL_DISABLED;

To this:
if(!IsShowEnabled() || i >= 0 && !button[i].enabled)
    return CTRL_DISABLED;


CtrlLib/MultiButton.cpp line 258.

[Updated on: Mon, 29 March 2010 13:14]

Report message to a moderator

Re: DropList proposal [message #26071 is a reply to message #26068] Mon, 29 March 2010 22:28 Go to previous messageGo to next message
Mindtraveller is currently offline  Mindtraveller
Messages: 917
Registered: August 2007
Location: Russia, Moscow rgn.
Experienced Contributor

Thank you very much! Just checked and it works perfectly.
Hope this patch will be on SVN.
Re: DropList proposal [message #26082 is a reply to message #26071] Tue, 30 March 2010 22:23 Go to previous message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
Thanks, patch applied.

Mirek
Previous Topic: Bluetooth support?
Next Topic: ButtonOption bug? Centering QTF string
Goto Forum:
  


Current Time: Fri Apr 19 10:58:21 CEST 2024

Total time taken to generate the page: 0.02906 seconds