What component to use for selection of 2000 possibilities  [SOLVED]

Are you writing your own components and need help with how to set them up or have questions about the components you are deriving from ? Ask them here.
spamiam
I live to help wx-kind
I live to help wx-kind
Posts: 180
Joined: Wed Apr 22, 2009 1:40 am

What component to use for selection of 2000 possibilities

Postby spamiam » Thu Jul 25, 2013 12:29 pm

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

catalin
Moderator
Moderator
Posts: 1455
Joined: Wed Nov 12, 2008 7:23 am
Location: Romania

Re: What component to use for selection of 2000 possibilitie  [SOLVED]

Postby catalin » Thu Jul 25, 2013 10:01 pm

wxSpinCtrlDouble ?

spamiam
I live to help wx-kind
I live to help wx-kind
Posts: 180
Joined: Wed Apr 22, 2009 1:40 am

Re: What component to use for selection of 2000 possibilitie

Postby spamiam » Fri Jul 26, 2013 4:01 pm

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?

catalin
Moderator
Moderator
Posts: 1455
Joined: Wed Nov 12, 2008 7:23 am
Location: Romania

Re: What component to use for selection of 2000 possibilitie

Postby catalin » Fri Jul 26, 2013 4:14 pm

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.

spamiam
I live to help wx-kind
I live to help wx-kind
Posts: 180
Joined: Wed Apr 22, 2009 1:40 am

Re: What component to use for selection of 2000 possibilitie

Postby spamiam » Mon Jul 29, 2013 12:42 pm

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


Return to “Component Writing”

Who is online

Users browsing this forum: No registered users and 1 guest