On mouse-enter, change on/off icon to on, on mouse-out, change on/off icon to previous state

This commit is contained in:
Ferdi van der Werf 2012-04-18 20:28:53 +02:00
parent 9b31b8f6b3
commit eb0aac458b

View file

@ -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):