|
def | __init__ (self, parent=None, rows=24, columns=80) |
|
def | check_scroll (self, event=None) |
|
def | insert (self, pos, text) |
|
def | append (self, text) |
|
def | fileno (self) |
|
def | close (self) |
|
def | flush (self) |
|
def | isatty (self) |
|
def | __next__ (self) |
|
def | read (self, size=0) |
|
def | readline (self, size=0) |
|
def | readlines (self, size=0) |
|
def | readline (self, size=0) |
|
def | seek (self, offset, pos=0) |
|
def | tell (self) |
|
def | truncate (self, size=0) |
|
def | write (self, text) |
|
def | writelines (self, lines) |
|
Definition at line 26 of file textwindow.py.
def python.textwindow.TextWindow.__init__ |
( |
|
self, |
|
|
|
parent = None , |
|
|
|
rows = 24 , |
|
|
|
columns = 80 |
|
) |
| |
Definition at line 30 of file textwindow.py.
30 def __init__(self, parent=None, rows=24, columns=80):
41 tk.Frame.__init__(self, self.
parent)
43 self.pack(expand=1, fill=tk.BOTH)
44 self.rowconfigure(0, weight=1)
45 self.columnconfigure(0, weight=1)
49 self.
text = tk.Text(self, height=rows, width=columns, wrap=tk.NONE, takefocus=0)
50 self.text.grid(row=0, column=0, sticky=tk.N+tk.E+tk.W+tk.S)
54 self.
vbar = tk.Scrollbar(self, orient=tk.VERTICAL, command=self.text.yview)
55 self.
text[
'yscrollcommand'] = self.vbar.set
58 self.
hbar = tk.Scrollbar(self, orient=tk.HORIZONTAL, command=self.text.xview)
59 self.
text[
'xscrollcommand'] = self.hbar.set
def check_scroll(self, event=None)
def __init__(self, parent=None, rows=24, columns=80)
def python.textwindow.TextWindow.__next__ |
( |
|
self | ) |
|
Definition at line 128 of file textwindow.py.
129 raise IOError(
'File is not open for reading.')
def python.textwindow.TextWindow.append |
( |
|
self, |
|
|
|
text |
|
) |
| |
def python.textwindow.TextWindow.check_scroll |
( |
|
self, |
|
|
|
event = None |
|
) |
| |
Definition at line 71 of file textwindow.py.
75 yv = self.text.yview()
76 if not self.
vbar_visible and (yv[0] != 0.0
or yv[1] != 1.0):
78 self.vbar.grid(row=0, column=1, sticky=tk.N+tk.S)
79 elif self.
vbar_visible and yv[0] == 0.0
and yv[1] == 1.0:
81 self.vbar.grid_forget()
85 xv = self.text.xview()
86 if not self.
hbar_visible and (xv[0] != 0.0
or xv[1] != 1.0):
88 self.hbar.grid(row=1, column=0, sticky=tk.E+tk.W)
89 elif self.
hbar_visible and xv[0] == 0.0
and xv[1] == 1.0:
91 self.hbar.grid_forget()
def check_scroll(self, event=None)
def python.textwindow.TextWindow.close |
( |
|
self | ) |
|
def python.textwindow.TextWindow.fileno |
( |
|
self | ) |
|
def python.textwindow.TextWindow.flush |
( |
|
self | ) |
|
def python.textwindow.TextWindow.insert |
( |
|
self, |
|
|
|
pos, |
|
|
|
text |
|
) |
| |
Definition at line 95 of file textwindow.py.
96 self.text.insert(pos, text)
def check_scroll(self, event=None)
def insert(self, pos, text)
def python.textwindow.TextWindow.isatty |
( |
|
self | ) |
|
def python.textwindow.TextWindow.read |
( |
|
self, |
|
|
|
size = 0 |
|
) |
| |
Definition at line 130 of file textwindow.py.
131 raise IOError(
'File is not open for reading.')
def python.textwindow.TextWindow.readline |
( |
|
self, |
|
|
|
size = 0 |
|
) |
| |
Definition at line 132 of file textwindow.py.
133 raise IOError(
'File is not open for reading.')
def readline(self, size=0)
def python.textwindow.TextWindow.readline |
( |
|
self, |
|
|
|
size = 0 |
|
) |
| |
Definition at line 136 of file textwindow.py.
137 raise IOError(
'File is not open for reading.')
def readline(self, size=0)
def python.textwindow.TextWindow.readlines |
( |
|
self, |
|
|
|
size = 0 |
|
) |
| |
Definition at line 134 of file textwindow.py.
135 raise IOError(
'File is not open for reading.')
def readlines(self, size=0)
def python.textwindow.TextWindow.seek |
( |
|
self, |
|
|
|
offset, |
|
|
|
pos = 0 |
|
) |
| |
Definition at line 138 of file textwindow.py.
139 raise IOError(
'File is not open for reading.')
def seek(self, offset, pos=0)
def python.textwindow.TextWindow.tell |
( |
|
self | ) |
|
def python.textwindow.TextWindow.truncate |
( |
|
self, |
|
|
|
size = 0 |
|
) |
| |
Definition at line 148 of file textwindow.py.
149 self.
text[
'text'] = self.
text[
'text'][0:size]
151 self.text.yview_moveto(1.0)
def check_scroll(self, event=None)
def truncate(self, size=0)
def python.textwindow.TextWindow.write |
( |
|
self, |
|
|
|
text |
|
) |
| |
def python.textwindow.TextWindow.writelines |
( |
|
self, |
|
|
|
lines |
|
) |
| |
Definition at line 158 of file textwindow.py.
161 self.text.yview_moveto(1.0)
162 def writelines(self, lines)
python.textwindow.TextWindow.hbar |
python.textwindow.TextWindow.hbar_visible |
python.textwindow.TextWindow.parent |
python.textwindow.TextWindow.text |
python.textwindow.TextWindow.vbar |
python.textwindow.TextWindow.vbar_visible |
The documentation for this class was generated from the following file: