U++ framework
Do not panic. Ask here before giving up.

Home » Community » Newbie corner » Toolbuttons
Re: Toolbuttons [message #25004 is a reply to message #25003] Sun, 07 February 2010 04:58 Go to previous messageGo to previous message
alendar is currently offline  alendar
Messages: 47
Registered: January 2010
Location: Idaho, USA
Member
Well, that was hard - not.

To do a toggle, you just do this in the event handler:

void RepeatSongs() {
repeat.Check(!repeat.IsChecked());
}

It flips it on and off when clicking. Doesn't get much easier than that. EXCEPT -- the ButtonOption has the "=" operator overridden for boolean so you can just:

repeat = !(repeat.IsChecked());

sigh, so much time is wasted without this obfuscation. Evil or Very Mad


cd7651feeb698f6ac6cec1f6deda5e5b
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: v.1952 errors
Next Topic: TopMost
Goto Forum:
  


Current Time: Tue Jun 23 13:56:08 GMT+2 2026

Total time taken to generate the page: 0.00667 seconds