Back to index

python3.2  3.2.2
Classes | Functions
idlelib.ScrolledList Namespace Reference

Classes

class  ScrolledList

Functions

def test
def main

Function Documentation

Definition at line 134 of file ScrolledList.py.

00134 
00135 def main():
00136     root = test()
00137     root.mainloop()

Definition at line 122 of file ScrolledList.py.

00122 
00123 def test():
00124     root = Tk()
00125     root.protocol("WM_DELETE_WINDOW", root.destroy)
00126     class MyScrolledList(ScrolledList):
00127         def fill_menu(self): self.menu.add_command(label="pass")
00128         def on_select(self, index): print("select", self.get(index))
00129         def on_double(self, index): print("double", self.get(index))
00130     s = MyScrolledList(root)
00131     for i in range(30):
00132         s.append("item %02d" % i)
00133     return root