예제 #1
0
    def showtip(self):
        # make sure tip is on the screen

        ToolTipBase.showtip(self)
        tipwindow = self.tipwindow
        tipwindow.update_idletasks()

        sw = tipwindow.winfo_screenwidth()
        tw = tipwindow.winfo_width()
        tx = tipwindow.winfo_x()
        ty = tipwindow.winfo_y()

        delta = tw + tx - sw
        if delta > 0:
            # must shift the tipwindow to the left by delta
            dx = tx - delta
            tipwindow.wm_geometry('+%d+%d' % (dx, ty))
예제 #2
0
    def showtip(self):
        # make sure tip is on the screen

        ToolTipBase.showtip(self)
        tipwindow = self.tipwindow
        tipwindow.update_idletasks()

        sw = tipwindow.winfo_screenwidth()
        tw = tipwindow.winfo_width()
        tx = tipwindow.winfo_x()
        ty = tipwindow.winfo_y()

        delta = tw + tx - sw
        if delta > 0:
            # must shift the tipwindow to the left by delta
            dx = tx - delta
            tipwindow.wm_geometry('+%d+%d' % (dx, ty))
예제 #3
0
 def showcontents(self):
     try:
         text = self.text_callback()
     except:
         text = ''
     ToolTipBase.showcontents(self, text)
예제 #4
0
 def __init__(self, button, text_callback):
     ToolTipBase.__init__(self, button)
     self.text_callback = text_callback
예제 #5
0
 def showcontents(self):
     try:
         text = self.text_callback()
     except:
         text = ''
     ToolTipBase.showcontents(self, text)
예제 #6
0
 def __init__(self, button, text_callback):
     ToolTipBase.__init__(self, button)
     self.text_callback = text_callback