Back to index

python3.2  3.2.2
Public Member Functions | Public Attributes
idlelib.ToolTip.ListboxToolTip Class Reference
Inheritance diagram for idlelib.ToolTip.ListboxToolTip:
Inheritance graph
[legend]
Collaboration diagram for idlelib.ToolTip.ListboxToolTip:
Collaboration graph
[legend]

List of all members.

Public Member Functions

def __init__
def showcontents
def enter
def leave
def schedule
def unschedule
def showtip
def showcontents
def hidetip

Public Attributes

 items
 button
 tipwindow
 id
 x
 y

Detailed Description

Definition at line 69 of file ToolTip.py.


Constructor & Destructor Documentation

def idlelib.ToolTip.ListboxToolTip.__init__ (   self,
  button,
  items 
)

Definition at line 70 of file ToolTip.py.

00070 
00071     def __init__(self, button, items):
00072         ToolTipBase.__init__(self, button)
        self.items = items

Here is the caller graph for this function:


Member Function Documentation

def idlelib.ToolTip.ToolTipBase.enter (   self,
  event = None 
) [inherited]

Definition at line 19 of file ToolTip.py.

00019 
00020     def enter(self, event=None):
00021         self.schedule()

Here is the call graph for this function:

Here is the caller graph for this function:

def idlelib.ToolTip.ToolTipBase.hidetip (   self) [inherited]

Definition at line 56 of file ToolTip.py.

00056 
00057     def hidetip(self):
00058         tw = self.tipwindow
00059         self.tipwindow = None
00060         if tw:
00061             tw.destroy()

Here is the caller graph for this function:

def idlelib.ToolTip.ToolTipBase.leave (   self,
  event = None 
) [inherited]

Definition at line 22 of file ToolTip.py.

00022 
00023     def leave(self, event=None):
00024         self.unschedule()
00025         self.hidetip()

Here is the call graph for this function:

Here is the caller graph for this function:

def idlelib.ToolTip.ToolTipBase.schedule (   self) [inherited]

Definition at line 26 of file ToolTip.py.

00026 
00027     def schedule(self):
00028         self.unschedule()
00029         self.id = self.button.after(1500, self.showtip)

Here is the call graph for this function:

Here is the caller graph for this function:

def idlelib.ToolTip.ToolTipBase.showcontents (   self,
  text = "Your text here" 
) [inherited]

Definition at line 50 of file ToolTip.py.

00050 
00051     def showcontents(self, text="Your text here"):
00052         # Override this in derived class
00053         label = Label(self.tipwindow, text=text, justify=LEFT,
00054                       background="#ffffe0", relief=SOLID, borderwidth=1)
00055         label.pack()

Here is the caller graph for this function:

Definition at line 73 of file ToolTip.py.

00073 
00074     def showcontents(self):
00075         listbox = Listbox(self.tipwindow, background="#ffffe0")
00076         listbox.pack()
00077         for item in self.items:
00078             listbox.insert(END, item)

def idlelib.ToolTip.ToolTipBase.showtip (   self) [inherited]

Definition at line 36 of file ToolTip.py.

00036 
00037     def showtip(self):
00038         if self.tipwindow:
00039             return
00040         # The tip window must be completely outside the button;
00041         # otherwise when the mouse enters the tip window we get
00042         # a leave event and it disappears, and then we get an enter
00043         # event and it reappears, and so on forever :-(
00044         x = self.button.winfo_rootx() + 20
00045         y = self.button.winfo_rooty() + self.button.winfo_height() + 1
00046         self.tipwindow = tw = Toplevel(self.button)
00047         tw.wm_overrideredirect(1)
00048         tw.wm_geometry("+%d+%d" % (x, y))
00049         self.showcontents()

Here is the call graph for this function:

Here is the caller graph for this function:

def idlelib.ToolTip.ToolTipBase.unschedule (   self) [inherited]

Definition at line 30 of file ToolTip.py.

00030 
00031     def unschedule(self):
00032         id = self.id
00033         self.id = None
00034         if id:
00035             self.button.after_cancel(id)

Here is the caller graph for this function:


Member Data Documentation

Definition at line 11 of file ToolTip.py.

Definition at line 13 of file ToolTip.py.

Definition at line 72 of file ToolTip.py.

Definition at line 12 of file ToolTip.py.

Definition at line 14 of file ToolTip.py.

Definition at line 14 of file ToolTip.py.


The documentation for this class was generated from the following file: