Just van Rossum | a840fca | 1999-09-26 12:25:06 +0000 | [diff] [blame^] | 1 | import W |
2 | |||||
3 | def listhit(isdbl): | ||||
4 | if isdbl: | ||||
5 | print "double-click in list!" | ||||
6 | else: | ||||
7 | print "click in list." | ||||
8 | |||||
9 | window = W.Window((200, 400), "Window with List", minsize = (150, 200)) | ||||
10 | |||||
11 | window.list = W.List((-1, 20, 1, -14), [], listhit) | ||||
12 | |||||
13 | # or (equivalent): | ||||
14 | # window.list = W.List((-1, 20, 1, -14), callback = listhit) | ||||
15 | |||||
16 | window.list.set(range(13213, 13350)) | ||||
17 | window.open() |