Number as text input

If you are using the main C++ distribution of wxWidgets, Feel free to ask any question related to wxWidgets development here. This means questions regarding to C++ and wxWidgets, not compile problems.
r4nd0m6uy
In need of some credit
In need of some credit
Posts: 4
Joined: Wed Oct 03, 2018 12:29 pm

Number as text input

Postby r4nd0m6uy » Mon Oct 08, 2018 1:28 pm

Is there any component that permits having a number input like a text fiel, with min/max and two buttons to increase or decrease the value? I have a naive implementatiion with a wxTextCtrl but doesn't work as expected ... Any recommendation or should I write my own?

New Pagodi
Super wx Problem Solver
Super wx Problem Solver
Posts: 255
Joined: Tue Jun 20, 2006 6:47 pm
Contact:

Re: Number as text input

Postby New Pagodi » Mon Oct 08, 2018 2:19 pm

It sounds like the control you're looking for is wxSpinCtrl.

r4nd0m6uy
In need of some credit
In need of some credit
Posts: 4
Joined: Wed Oct 03, 2018 12:29 pm

Re: Number as text input

Postby r4nd0m6uy » Mon Oct 08, 2018 2:36 pm

Great, I was surprised that it didn't exist!

Is there a page with a collection of all widgets, so I don't need to ask?

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

Re: Number as text input

Postby catalin » Mon Oct 08, 2018 3:38 pm

r4nd0m6uy wrote:Is there a page with a collection of all widgets, so I don't need to ask?

Build 'widgets' sample; it has a lot of them used there if not all.

PB
Part Of The Furniture
Part Of The Furniture
Posts: 1707
Joined: Sun Jan 03, 2010 5:45 pm

Re: Number as text input

Postby PB » Mon Oct 08, 2018 6:02 pm



Return to “C++ Development”

Who is online

Users browsing this forum: No registered users and 13 guests