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 » Selected option, show which is active
Re: Selected option, show which is active [message #28328 is a reply to message #28318] Fri, 27 August 2010 21:26 Go to previous messageGo to previous message
nlneilson is currently offline  nlneilson
Messages: 644
Registered: January 2010
Location: U.S. California. Mojave &...
Contributor
That puts a check mark in the box, good.
How this is worked into the code is a problem.

I searched the examples and bazarr plus don't recall anything in any documentation that covers this.

	void SettingsMenu(Bar& bar) {
		bar.Add("m meters", THISBACK(Setm)).Check(true);
		bar.Add("km kilometers"THISBACK(Setkm)).Check(true);
...
...

	void Setm() {
		Distm<<=revDistance(~Distance, un);
		un = 0;	
		Cfg[0] = "0";
		units<<="m";
		Distance<<=formatDistance(s, un, dp);
	}
	void Setkm() {
		Distm<<=revDistance(~Distance, un);
		un = 1;	
		Cfg[0] = "1";
		units<<="km";
		Distance<<=formatDistance(s, un, dp);
	}
	void Setft() {
		Distm<<=revDistance(~Distance, un);
		un = 2;	
		Cfg[0] = "2";
		units<<="ft";
		Distance<<=formatDistance(s, un, dp);
	}


How would you include .Check(true) in the Setft() function?

Without an example I could spend a considerable amount of time tinkering. There may be something built into U++ that helps on this, like when one is picked/checked any other option in that section is unchecked.
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Making applications more fancy
Next Topic: Query regarding PopUpTable
Goto Forum:
  


Current Time: Sun Jun 22 20:09:14 CEST 2025

Total time taken to generate the page: 0.03779 seconds