MCPcopy Create free account
hub / github.com/ActiveState/code / TextPlus

Class TextPlus

recipes/Python/579107_simplify_webpage/recipe-579107.py:60–73  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

58 return (event, )
59
60class 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
75class EntryPlus(Tkinter.Entry):
76 def __init__(self, *args, **kwargs):

Callers 1

textwindowFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected