| 415 | |
| 416 | |
| 417 | def _multi_call(parent): # htest # |
| 418 | top = tkinter.Toplevel(parent) |
| 419 | top.title("Test MultiCall") |
| 420 | x, y = map(int, parent.geometry().split('+')[1:]) |
| 421 | top.geometry("+%d+%d" % (x, y + 175)) |
| 422 | text = MultiCallCreator(tkinter.Text)(top) |
| 423 | text.pack() |
| 424 | text.focus_set() |
| 425 | |
| 426 | def bindseq(seq, n=[0]): |
| 427 | def handler(event): |
| 428 | print(seq) |
| 429 | text.bind("<<handler%d>>"%n[0], handler) |
| 430 | text.event_add("<<handler%d>>"%n[0], seq) |
| 431 | n[0] += 1 |
| 432 | bindseq("<Key>") |
| 433 | bindseq("<Control-Key>") |
| 434 | bindseq("<Alt-Key-a>") |
| 435 | bindseq("<Control-Key-a>") |
| 436 | bindseq("<Alt-Control-Key-a>") |
| 437 | bindseq("<Key-b>") |
| 438 | bindseq("<Control-Button-1>") |
| 439 | bindseq("<Button-2>") |
| 440 | bindseq("<Alt-Button-1>") |
| 441 | bindseq("<FocusOut>") |
| 442 | bindseq("<Enter>") |
| 443 | bindseq("<Leave>") |
| 444 | |
| 445 | |
| 446 | if __name__ == "__main__": |