Lines Matching refs:self
17 def set(self, lo, hi):
19 self.grid()
21 self.grid_remove()
24 def pack(self, **kwargs):
25 raise TclError(f'{self.__class__.__name__} does not support "pack"')
27 def place(self, **kwargs):
28 raise TclError(f'{self.__class__.__name__} does not support "place"')
34 def __init__(self, master, wrap=NONE, **kwargs):
49 text = self.text = Text(self, wrap=wrap)
51 self.grid_rowconfigure(0, weight=1)
52 self.grid_columnconfigure(0, weight=1)
55 self.yscroll = AutoHideScrollbar(self, orient=VERTICAL,
58 self.yscroll.grid(row=0, column=1, sticky=NS)
59 text['yscrollcommand'] = self.yscroll.set
63 self.xscroll = AutoHideScrollbar(self, orient=HORIZONTAL,
66 self.xscroll.grid(row=1, column=0, sticky=EW)
67 text['xscrollcommand'] = self.xscroll.set
69 self.xscroll = None
74 def __init__(self, parent, contents, wrap='word'):
84 self.parent = parent
85 self.bind('<Return>', self.ok)
86 self.bind('<Escape>', self.ok)
87 self.textframe = ScrollableTextFrame(self, relief=SUNKEN, height=700)
89 text = self.text = self.textframe.text
95 self.button_ok = button_ok = Button(
96 self, text='Close', command=self.ok, takefocus=False)
97 self.textframe.pack(side='top', expand=True, fill='both')
100 def ok(self, event=None):
102 self.parent.destroy()
108 def __init__(self, parent, title, contents, modal=True, wrap=WORD,
123 self['borderwidth'] = 5
127 self.geometry(f'=750x500+{x}+{y}')
129 self.title(title)
130 self.viewframe = ViewFrame(self, contents, wrap=wrap)
131 self.protocol("WM_DELETE_WINDOW", self.ok)
132 self.button_ok = button_ok = Button(self, text='Close',
133 command=self.ok, takefocus=False)
134 self.viewframe.pack(side='top', expand=True, fill='both')
136 self.is_modal = modal
137 if self.is_modal:
138 self.transient(parent)
139 self.grab_set()
141 self.wait_window()
143 def ok(self, event=None):
145 if self.is_modal:
146 self.grab_release()
147 self.destroy()