Page 1 of 1

What component to use for selection of 2000 possibilities

Posted: Thu Jul 25, 2013 12:29 pm
by spamiam
Hello,

I am looking for a component to select a numeric value. The values are from -10 to +10 in 0.01 increments. I would not mind having to select the 2 digits to the left of the decimal and then the 2 digits to the right as separate operations, but it still is a lot of possibilities. What would you recommend as the easiest/most efficient method to do this? By easy/efficient, I mean that the GUI is easy/efficient to use, though it would be nice if it were easy to code too! Ultimately, the combination of selections will be combined into one floating point value. I guess I could use a combobox or something to have the user type in the value, but it would be nice to have it able to be completely mouse driven as the primary method, and quick to use. A link to an already developed control would be wonderful!

TIA, Tony

Re: What component to use for selection of 2000 possibilitie

Posted: Thu Jul 25, 2013 10:01 pm
by catalin
wxSpinCtrlDouble ?

Re: What component to use for selection of 2000 possibilitie

Posted: Fri Jul 26, 2013 4:01 pm
by spamiam
I will try it out. The docs show a comma between the 2 sets of numbers. Is that able to be changed to a user-selected character, such as a decimal point?

Re: What component to use for selection of 2000 possibilitie

Posted: Fri Jul 26, 2013 4:14 pm
by catalin
Decimal separator should be locale dependent. Try it in your app, it may show as a decimal point by default. Or set the locale explicitly in your app if you fear it might change to comma for another user.

Re: What component to use for selection of 2000 possibilitie

Posted: Mon Jul 29, 2013 12:42 pm
by spamiam
wxSpinCtrlDouble was quite close to what I wanted, and it will work well. Unfortunately, I had an older version of wxwidgets along with an older wxDev-CPP, and I had to upgrade. THat was a little bit of a problem by itself. Still not all straightened out. But the project does compile in the new environment and the new control does the job well. Thanks