Back to index

python3.2  3.2.2
Public Member Functions | Public Attributes
idlelib.TreeWidget.ScrolledCanvas Class Reference

List of all members.

Public Member Functions

def __init__
def page_up
def page_down
def unit_up
def unit_down
def zoom_height

Public Attributes

 master
 frame
 canvas
 vbar
 hbar

Detailed Description

Definition at line 410 of file TreeWidget.py.


Constructor & Destructor Documentation

def idlelib.TreeWidget.ScrolledCanvas.__init__ (   self,
  master,
  opts 
)

Definition at line 411 of file TreeWidget.py.

00411 
00412     def __init__(self, master, **opts):
00413         if 'yscrollincrement' not in opts:
00414             opts['yscrollincrement'] = 17
00415         self.master = master
00416         self.frame = Frame(master)
00417         self.frame.rowconfigure(0, weight=1)
00418         self.frame.columnconfigure(0, weight=1)
00419         self.canvas = Canvas(self.frame, **opts)
00420         self.canvas.grid(row=0, column=0, sticky="nsew")
00421         self.vbar = Scrollbar(self.frame, name="vbar")
00422         self.vbar.grid(row=0, column=1, sticky="nse")
00423         self.hbar = Scrollbar(self.frame, name="hbar", orient="horizontal")
00424         self.hbar.grid(row=1, column=0, sticky="ews")
00425         self.canvas['yscrollcommand'] = self.vbar.set
00426         self.vbar['command'] = self.canvas.yview
00427         self.canvas['xscrollcommand'] = self.hbar.set
00428         self.hbar['command'] = self.canvas.xview
00429         self.canvas.bind("<Key-Prior>", self.page_up)
00430         self.canvas.bind("<Key-Next>", self.page_down)
00431         self.canvas.bind("<Key-Up>", self.unit_up)
00432         self.canvas.bind("<Key-Down>", self.unit_down)
00433         #if isinstance(master, Toplevel) or isinstance(master, Tk):
00434         self.canvas.bind("<Alt-Key-2>", self.zoom_height)
        self.canvas.focus_set()

Here is the caller graph for this function:


Member Function Documentation

def idlelib.TreeWidget.ScrolledCanvas.page_down (   self,
  event 
)

Definition at line 438 of file TreeWidget.py.

00438 
00439     def page_down(self, event):
00440         self.canvas.yview_scroll(1, "page")
        return "break"
def idlelib.TreeWidget.ScrolledCanvas.page_up (   self,
  event 
)

Definition at line 435 of file TreeWidget.py.

00435 
00436     def page_up(self, event):
00437         self.canvas.yview_scroll(-1, "page")
        return "break"
def idlelib.TreeWidget.ScrolledCanvas.unit_down (   self,
  event 
)

Definition at line 444 of file TreeWidget.py.

00444 
00445     def unit_down(self, event):
00446         self.canvas.yview_scroll(1, "unit")
        return "break"
def idlelib.TreeWidget.ScrolledCanvas.unit_up (   self,
  event 
)

Definition at line 441 of file TreeWidget.py.

00441 
00442     def unit_up(self, event):
00443         self.canvas.yview_scroll(-1, "unit")
        return "break"
def idlelib.TreeWidget.ScrolledCanvas.zoom_height (   self,
  event 
)

Definition at line 447 of file TreeWidget.py.

00447 
00448     def zoom_height(self, event):
00449         ZoomHeight.zoom_height(self.master)
00450         return "break"
00451 
00452 
00453 # Testing functions


Member Data Documentation

Definition at line 418 of file TreeWidget.py.

Definition at line 415 of file TreeWidget.py.

Definition at line 422 of file TreeWidget.py.

Definition at line 414 of file TreeWidget.py.

Definition at line 420 of file TreeWidget.py.


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