controls/CustomToolTip.py
changeset 1771 f68a105000be
parent 1769 4665ba25a0ba
child 1782 5b6ad7a7fd9d
equal deleted inserted replaced
1770:449fd504a711 1771:f68a105000be
   104                 # Add ... to the end of last line to indicate that tool tip
   104                 # Add ... to the end of last line to indicate that tool tip
   105                 # text is too long
   105                 # text is too long
   106                 if len(self.Tip[-1]) < TOOLTIP_MAX_CHARACTERS - 3:
   106                 if len(self.Tip[-1]) < TOOLTIP_MAX_CHARACTERS - 3:
   107                     self.Tip[-1] += "..."
   107                     self.Tip[-1] += "..."
   108                 else:
   108                 else:
   109                     self.Tip[-1] = self.Tip[-1]\
   109                     self.Tip[-1] = self.Tip[-1][:TOOLTIP_MAX_CHARACTERS - 3] + \
   110                         [:TOOLTIP_MAX_CHARACTERS - 3] + "..."
   110                                    "..."
   111         else:
   111         else:
   112             self.Tip = tip.splitlines()
   112             self.Tip = tip.splitlines()
   113 
   113 
   114         # Prevent to call wx method in non-wx threads
   114         # Prevent to call wx method in non-wx threads
   115         wx.CallAfter(self.RefreshTip)
   115         wx.CallAfter(self.RefreshTip)