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 » 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: Thu May 23 12:09:01 CEST 2024

Total time taken to generate the page: 0.02087 seconds