Beispiel #1
0
 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)
Beispiel #2
0
 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")