10 lines
2.2 KiB
HTML
10 lines
2.2 KiB
HTML
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
|
|
<html><head><meta content="text/html; charset=ISO-8859-1" http-equiv="content-type"><title>TextEditor class</title></head>
|
|
<body><h1>class <span style="font-family: monospace;">TextEditor(<a href="Component.html">Component</a>)</span></h1>A TextEditor
|
|
provides efficient editing of large amounts of text.<br><br>There may optionally be horizontal and/or vertical scroll bars. If there is no horizontal
|
|
scroll bar, text is wrapped to the width of the component.<br><br>Tab stops may be set at regularly-spaced intervals.<br><h2>Constructor</h2><dl style="margin-left: 40px;"><dt style="font-family: monospace;">TextEditor(scrolling = 'hv')</dt><dd>Creates a TextEditor. Presence of scroll bars is controlled by the
|
|
<span style="font-style: italic;">scrolling</span> parameter, which is a string containing <span style="font-family: monospace;">'h'</span> for horizontal
|
|
and <span style="font-family: monospace;">'v'</span> for vertical.</dd></dl><h2>Properties</h2><dl style="margin-left: 40px;"><dt style="font-family: monospace;">text</dt><dd>The text being edited, as a string.<br><br></dd><dt style="font-family: monospace;">text_length</dt><dd><span style="font-style: italic;">Read only.</span> The number of characters in the text<br><br></dd><dt style="font-family: monospace;">selection</dt><dd>A tuple of indexes (start, end) representing the range of selected characters.<br><br></dd><dt style="font-family: monospace;">font</dt><dd>The <a href="Font.html">Font</a> in which the text is displayed.<br><br></dd><dt style="font-family: monospace;">tab_spacing</dt><dd>Distance between tab stops.</dd></dl><h2>Methods</h2><dl style="margin-left: 40px;"><dt style="font-family: monospace;">select_all()</dt><dd>Selects all of the text.</dd></dl><blockquote> <dl><dt><tt>cut_cmd()</tt></dt><dt><tt>copy_cmd()</tt></dt><dt><tt>paste_cmd()</tt></dt><dt><tt>clear_cmd()<br>select_all_cmd()</tt></dt><dd>These implement the standard editing menu commands. The corresponding
|
|
menu items are enabled automatically whenever the component has the keyboard
|
|
focus.</dd></dl>
|
|
</blockquote><br>---<br></body></html> |