I need to use something like wxSpinCtrl, but need to have the up and down (arrow) buttons much larger, so that it's easy to manipulate using a finger on a touch screen. Also, if the text box in spinctrl is enlarged, I'd like the text label to be centered, rather than at the top.
Right now I get something like (dots are spaces):
+------------+---+
|.....88....| ^ |
|............|...|
|............| v |
+------------+---+
and I really want something like this:
+------------+----------+
|............|....^.....|
|.....88....|...........|
|............|.....v.....|
+------------+----------+
Is there any way to "resize" wxSpinCtrl, or is there any widget that would do what I need?
Thanks in advance for all help.
wxSpinCtrl larger buttons
Re: wxSpinCtrl larger buttons
I have not tested it, but, what about adding the wxSpinCtrl to a sizer, and setting some minimum value for its size?
Be aware that in some platforms this control is native, so I dude about such a size-feature.
In the worst case you can create your own composite control (as wxSpinCtrl is, see /src/generic/spinctlg.cpp) and resize the spinbutton and texctrl on your own.
Be aware that in some platforms this control is native, so I dude about such a size-feature.
In the worst case you can create your own composite control (as wxSpinCtrl is, see /src/generic/spinctlg.cpp) and resize the spinbutton and texctrl on your own.
Re: wxSpinCtrl larger buttons
After playing around with the available widgets, I think I'm resigned to just putting together basic components and wiring up thing myself. It's just not that simple to get buttons/controls/displays with the proportions I need. For the wxSpinCtrl functionality, I just have to piece together two wxButton's and one wxStaticText.
I need/want to do a list box or combo box thing also, with bigger buttons, but have decided it's just easier to use the same buttons+text method.
As you point out, people who do a lot of these GUIs probably build personal libraries of favorite composite controls that do exactly what they want, with the looks they prefer. I just need something quick, simple, and easy.
Thanks.
I need/want to do a list box or combo box thing also, with bigger buttons, but have decided it's just easier to use the same buttons+text method.
As you point out, people who do a lot of these GUIs probably build personal libraries of favorite composite controls that do exactly what they want, with the looks they prefer. I just need something quick, simple, and easy.
Thanks.
Re: wxSpinCtrl larger buttons
Hi,
Is this for the HighDPI display?
Keep in mind that wxWidgets is known to use a native controls whenever possible. So if the native control doesn't have this functionality - you definitely need to create a custom one.
Thank you.
Is this for the HighDPI display?
Keep in mind that wxWidgets is known to use a native controls whenever possible. So if the native control doesn't have this functionality - you definitely need to create a custom one.
Thank you.
Re: wxSpinCtrl larger buttons
I'm using a 3.5" touchscreen on a Raspberry Pi. The goal is to have buttons big enough for a finger to activate.
Yes. native controls are meant to use the screen as a "computer display," with buttons that are controllable via a cursor (mouse, touchpad, stylus, etc.), so the relative dimensions of controls verses status areas are pretty fixed at a very low ratio. The native controls also account for overall screen resolution settings, keeping the controls verses status areas proportions the same, but increasing/decreasing both sizes with the overall resolution.
It's custom set-ups for me.
Thanks.
Yes. native controls are meant to use the screen as a "computer display," with buttons that are controllable via a cursor (mouse, touchpad, stylus, etc.), so the relative dimensions of controls verses status areas are pretty fixed at a very low ratio. The native controls also account for overall screen resolution settings, keeping the controls verses status areas proportions the same, but increasing/decreasing both sizes with the overall resolution.
It's custom set-ups for me.
Thanks.