I have a SpinButton which I want to be larger than its default size; on Windows 10, the following code works to do this:
control_button_size = wx.Size(100, 50)
self.buttons['spin'] = wx.SpinButton(self, wx.ID_ANY, style=wx.SP_HORIZONTAL, size=control_button_size)
self.Bind(wx.EVT_SPIN, self._on_spin_button, self.buttons['spin'])
effect_label = wx.StaticText(self, label="Pick a value\n to increase\n or decrease")
control_button_sizer = wx.BoxSizer(wx.HORIZONTAL)
control_button_sizer.Add(self.buttons['spin'])
control_button_sizer.AddSpacer(5)
control_button_sizer.Add(effect_label, 1, wx.ALIGN_CENTER_VERTICAL)
return control_button_sizer
The up and down button on the SpinControl fill the Size set. However, on a Raspberry Pi 3 running Raspbian, the buttons appear to be their default size and have a text field next to them; the text box contains the SpinButton value that I set in the code, changing as it changes.
Does anyone know how to get the up/down controls to expand to a larger space?
EDIT: If I cannot get this control to expand to its space, is it possible to extend the control and override its painting methods? I tried that (class DrawnSpinButton(wx.SpinButton)), but the OnPaint() function of my subclass does not get called.