controls/DebugVariablePanel/GraphButton.py
changeset 1267 fae0809eae98
parent 1209 953a8f14040a
child 1571 486f94a8032c
--- a/controls/DebugVariablePanel/GraphButton.py	Tue Jun 18 09:55:45 2013 +0200
+++ b/controls/DebugVariablePanel/GraphButton.py	Wed Jun 19 22:13:44 2013 +0200
@@ -46,8 +46,8 @@
         """
         # Save button position
         self.SetPosition(x, y)
-        # Get wx.Bitmap object corresponding to bitmap
-        self.Bitmap = GetBitmap(bitmap)
+        # Set button bitmap
+        self.SetBitmap(bitmap)
         
         # By default button is hide and enabled
         self.Shown = False
@@ -63,6 +63,14 @@
         # Remove reference to callback function
         self.callback = None
     
+    def SetBitmap(self, bitmap):
+        """
+        Set bitmap to use for button
+        @param bitmap: Name of bitmap to use for button
+        """
+        # Get wx.Bitmap object corresponding to bitmap
+        self.Bitmap = GetBitmap(bitmap)
+    
     def GetSize(self):
         """
         Return size of button