X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/61b3549028093e724f118dfccdd266f6dcb04dc5..169f3a3d6ff1d73a71e8b03f04f7e252c619a630:/wxPython/wx/lib/buttonpanel.py diff --git a/wxPython/wx/lib/buttonpanel.py b/wxPython/wx/lib/buttonpanel.py index 05d9b3be58..7df01da87d 100644 --- a/wxPython/wx/lib/buttonpanel.py +++ b/wxPython/wx/lib/buttonpanel.py @@ -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)