wxSpinCtrlDouble minimum 5 makes manual input 12 impossible

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.
Post Reply
mael15
Ultimate wxWidgets Guru
Ultimate wxWidgets Guru
Posts: 539
Joined: Fri May 22, 2009 8:52 am
Location: Bremen, Germany

wxSpinCtrlDouble minimum 5 makes manual input 12 impossible

Post by mael15 »

Weird thing with wxSpinCtrlDouble, a minimum of i.e. 5 makes it impossible to manually enter any value starting with 1/2/3/4.

Code: Select all

wxSpinCtrlDouble *dblTest = new wxSpinCtrlDouble(this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, 5, 50);
It works fine with wxSpinCtrl.
Can this be fixed?
ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 7459
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Re: wxSpinCtrlDouble minimum 5 makes manual input 12 impossible

Post by ONEEYEMAN »

Hi,
What platform and wxWidgets version?
Can it be seen in the widgets sample?

Thank you.
Kvaz1r
Super wx Problem Solver
Super wx Problem Solver
Posts: 357
Joined: Tue Jun 07, 2016 1:07 pm

Re: wxSpinCtrlDouble minimum 5 makes manual input 12 impossible

Post by Kvaz1r »

It's reproducible in widgets sample for 3.1.4 and not for 3.1.3. The reason of the behaviour - commit Validate input in generic wxSpinCtrl and wxSpinCtrlDouble.
wxSpinCtrl Double(generic control under Windows) now is use validators and it's bug of validator. I slightly remember that there was a ticket for it, but maybe I'm wrong so propose to open a new one.
PB
Part Of The Furniture
Part Of The Furniture
Posts: 4193
Joined: Sun Jan 03, 2010 5:45 pm

Re: wxSpinCtrlDouble minimum 5 makes manual input 12 impossible

Post by PB »

Kvaz1r wrote: Wed Dec 30, 2020 10:18 am I slightly remember that there was a ticket for it
I think it is this one https://trac.wxwidgets.org/ticket/12968
Kvaz1r
Super wx Problem Solver
Super wx Problem Solver
Posts: 357
Joined: Tue Jun 07, 2016 1:07 pm

Re: wxSpinCtrlDouble minimum 5 makes manual input 12 impossible

Post by Kvaz1r »

That's exactly this one. And there is even PR with fix - Improve wxValidators.
ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 7459
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Re: wxSpinCtrlDouble minimum 5 makes manual input 12 impossible

Post by ONEEYEMAN »

Hi,.
The validators PR as all others are on hold until Vadim fix the HTTPS one.

In the mean time the OP could try to get that PR branch and test the code, leaving the comment in the PR (work/doesn't work).

Thank you.
mael15
Ultimate wxWidgets Guru
Ultimate wxWidgets Guru
Posts: 539
Joined: Fri May 22, 2009 8:52 am
Location: Bremen, Germany

Re: wxSpinCtrlDouble minimum 5 makes manual input 12 impossible

Post by mael15 »

thank you all, then I will use 0 as a minimum and check in every new release if this is fixed.
Post Reply