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 » Spin + Text
Spin + Text [message #39849] Mon, 06 May 2013 14:56 Go to previous message
jerson is currently offline  jerson
Messages: 202
Registered: June 2010
Location: Bombay, India
Experienced Member

I am looking to make a combination of a widget that houses a label with spin buttons. The intention is to use the spin buttons to change the text displayed in the widget from an array of texts

I have investigated various options including the template WithSpin<>. However, these things are beyond my understanding at this stage and I seek some help.

The way I did the task right now is very clumsy, but it works
I have an EditIntSpin on my layout that is shrunk to just show the spin buttons but not the value it holds. Another StaticLabel is lying adjacent to it that shows the String corresponding to the int value contained in the EditIntSpin. The way it works is when the spin is used, it callsback a function that loads the text to the label.
index.php?t=getfile&id=4172&private=0
Example
index Text
0 125
1 250
2 500
3 750

So, if the IntSpinner holds a value of 2, the Label will show 500

void	A2001_13::ChangeFrequency()
{
	Test.lblFreq.SetText(xLegend[Test.spnFrequency]);
}

// in the topwindow code
	Test.spnFrequency <<= THISBACK(ChangeFrequency);



I know this can be done using an ArrayCtrl + WithSpin; but, I am not upto it at the moment. Help please
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Socket Communication 101
Next Topic: MenuBar
Goto Forum:
  


Current Time: Sat Apr 20 05:32:24 CEST 2024

Total time taken to generate the page: 1.17854 seconds