In some case, I need change a value frequently to see it effect.
wxSpinCtrl now only mark its value validated after lose focus, while I need change its value again and again. It's not convenient.
I think wxSpinCtrl will be better with below two features:
1. Update value after press enter, and make its value selected will be convenient to change it again.
2. Add a property to set the change step after press its arrow button. Some times it value range is bit, change it 1 by 1 is two slow.
It would be better if wxSpinCtrl can mark its value validated and selected after press enter Topic is solved
It would be better if wxSpinCtrl can mark its value validated and selected after press enter
No, I know everything.
Re: It would be better if wxSpinCtrl can mark its value validated and selected after press enter
I think both issues could be solved by subclassing wxSpinCtrl and handling (and then skipping) the wxEVT_TEXT_ENTER and wxEVT_SPINCTRL events.JohnKnow wrote: ↑Tue Nov 23, 2021 6:00 am I think wxSpinCtrl will be better with below two features:
1. Update value after press enter, and make its value selected will be convenient to change it again.
2. Add a property to set the change step after press its arrow button. Some times it value range is bit, change it 1 by 1 is two slow.
Use the source, Luke!
Re: It would be better if wxSpinCtrl can mark its value validated and selected after press enter
Hi,
Problem 2 can be solved by using wxSpinCtrlDouble.
Thank you.
Problem 2 can be solved by using wxSpinCtrlDouble.
Thank you.
Re: It would be better if wxSpinCtrl can mark its value validated and selected after press enter
Hi doublemax, ONEEYEMAN,
Thank you for the reply, I would like to subclass wxSpinCtrl now.
Thank you for the reply, I would like to subclass wxSpinCtrl now.
No, I know everything.
- doublemax@work
- Super wx Problem Solver
- Posts: 474
- Joined: Wed Jul 29, 2020 6:06 pm
- Location: NRW, Germany
Re: It would be better if wxSpinCtrl can mark its value validated and selected after press enter
Just so you know...
Unlike for a textbook C++ class, subclassing a wxWidgets control may not be easy, as there may be different implementation (classes) for individual platforms, which just have the same public interface but their internals can considerably differ.
Looking at the docs, there are no documented virtual methods to override in wxSpinCtrl...
Re: It would be better if wxSpinCtrl can mark its value validated and selected after press enter
I fact, it is a request or suggestion for new feature/improvement.doublemax@work wrote: ↑Wed Nov 24, 2021 11:02 am Was that just a statement or a request for help regarding this task?
But ehh,, I can do it mysefl when I'm free if the org doesn't have such plan.
No, I know everything.
Re: It would be better if wxSpinCtrl can mark its value validated and selected after press enter
Hi PB,
I see, wxSpinCtrl has no virtual method. But it is drived from wxEvtHandler.
I guess, it could be possible to subclass it and add an event handler to its event table, or just bind a handler function to the control.
I will try it, or just change the official code then request to pull when I'm free. I have to live with it now because I'm rushing for my work
No, I know everything.
Re: It would be better if wxSpinCtrl can mark its value validated and selected after press enter
Thank you ONEEYEMAN, wxSpinCtrlDouble is pretty good.
No, I know everything.