]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/wx/lib/buttonpanel.py
put wx in the shell's namespace too
[wxWidgets.git] / wxPython / wx / lib / buttonpanel.py
index 05d9b3be583431bd2f673ee89e6d3bdeeb99c5c2..7df01da87d63a3578b3f61796cc7bb31fb267346 100644 (file)
@@ -620,7 +620,7 @@ class BPArt:
             if isVertical:
                 dc.DrawLine(rect.x, coord, rect.x + rect.width, coord) 
             else:
-                dc.DrawLine(coord, rect.y, coord, rect.y + rect.width)
+                dc.DrawLine(coord, rect.y, coord, rect.y + rect.height)
                 
             rf += rstep
             gf += gstep
@@ -1113,7 +1113,7 @@ class ButtonInfo(Control):
         if alignment == self._textAlignment:
             return
 
-        self._alignment = alignment
+        self._textAlignment = alignment
         
 
     def GetToggled(self):
@@ -1256,6 +1256,7 @@ class ButtonPanel(wx.PyPanel):
         self._useHelp = True
         self._freezeCount = 0
         self._currentButton = -1
+        self._haveTip = False
 
         self._art = BPArt(style)
 
@@ -1857,10 +1858,11 @@ class ButtonPanel(wx.PyPanel):
 
         if not self.GetUseHelp():
             return
-        
+
         shortHelp = hit.GetShortHelp()
         if shortHelp:
             self.SetToolTipString(shortHelp)
+            self._haveTip = True
 
         longHelp = hit.GetLongHelp()
         if not longHelp:
@@ -1886,7 +1888,9 @@ class ButtonPanel(wx.PyPanel):
         if not self.GetUseHelp():
             return
 
-        self.SetToolTipString("")
+        if self._haveTip:
+            self.SetToolTipString("")
+            self._haveTip = False
 
         if self._statusTimer and self._statusTimer.IsRunning():
             topLevel = wx.GetTopLevelParent(self)