On mouse-enter, change on/off icon to on, on mouse-out, change on/off icon to previous state
This commit is contained in:
1 parent
9b31b8f6b3
commit
eb0aac458b
1 file changed
+8
@@ -101,10 +101,14 @@ class ToggleButton(buttons.GenBitmapToggleButton):
|
||||
|
||||
def OnMouseEnter(self, event):
|
||||
self.GetParent().OnPopupDisplay(event)
|
||||
self.SetBitmap(True)
|
||||
self.Refresh()
|
||||
event.Skip()
|
||||
|
||||
def OnMouseLeave(self, event):
|
||||
self.GetParent().OnPopupHide(event)
|
||||
self.SetBitmap(self.GetValue())
|
||||
self.Refresh()
|
||||
event.Skip()
|
||||
|
||||
class RadioButton(buttons.GenBitmapButton):
|
||||
@@ -159,10 +163,14 @@ class RadioButton(buttons.GenBitmapButton):
|
||||
|
||||
def OnMouseEnter(self, event):
|
||||
self.GetParent().OnPopupDisplay(event)
|
||||
self.SetBitmap(True)
|
||||
self.Refresh()
|
||||
event.Skip()
|
||||
|
||||
def OnMouseLeave(self, event):
|
||||
self.GetParent().OnPopupHide(event)
|
||||
self.SetBitmap(self.GetValue())
|
||||
self.Refresh()
|
||||
event.Skip()
|
||||
|
||||
class NormalButton(buttons.GenBitmapButton):
|
||||
|
||||
Reference in new issue
Block a user