def on_wheel_spin_ctrl(self, event: wx.Event, inc=0.1): # スピンコントロール変更時 if event.GetWheelRotation() > 0: event.GetEventObject().SetValue(event.GetEventObject().GetValue() + inc) else: event.GetEventObject().SetValue(event.GetEventObject().GetValue() - inc)
def on_wheel_spin_ctrl(self, event: wx.Event, inc=0.1): # スピンコントロール変更時 if event.GetWheelRotation() > 0: event.GetEventObject().SetValue(event.GetEventObject().GetValue() + inc) if event.GetEventObject().GetValue() >= 0: event.GetEventObject().SetBackgroundColour("WHITE") else: event.GetEventObject().SetValue(event.GetEventObject().GetValue() - inc) if event.GetEventObject().GetValue() < 0: event.GetEventObject().SetBackgroundColour("TURQUOISE")