| 58 | return (event, ) |
| 59 | |
| 60 | class TextPlus(Tkinter.Text): |
| 61 | def __init__(self, *args, **kwargs): |
| 62 | Tkinter.Text.__init__(self, *args, **kwargs) |
| 63 | _rc_menu_install(self) |
| 64 | # overwrite default class binding so we don't need to return "break" |
| 65 | self.bind_class("Text", "<Control-a>", self.event_select_all) |
| 66 | self.bind("<Button-3><ButtonRelease-3>", self.show_menu) |
| 67 | |
| 68 | def event_select_all(self, *args): |
| 69 | self.focus_force() |
| 70 | self.tag_add("sel","1.0","end") |
| 71 | |
| 72 | def show_menu(self, e): |
| 73 | self.tk.call("tk_popup", self.menu, e.x_root, e.y_root) |
| 74 | |
| 75 | class EntryPlus(Tkinter.Entry): |
| 76 | def __init__(self, *args, **kwargs): |