1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145
|
<!doctype html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html><head><title>Python: module ScrolledTreectrl</title>
</head><body bgcolor="#f0f0f8">
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading">
<tr bgcolor="#7799ee">
<td valign=bottom> <br>
<font color="#ffffff" face="helvetica, arial"> <br><big><big><strong>ScrolledTreectrl</strong></big></big></font></td
><td align=right valign=bottom
><font color="#ffffff" face="helvetica, arial"><a href="./TkTreectrl.html">index</a><br><a href="file:./TkTreectrl/ScrolledTreectrl.py">./TkTreectrl/ScrolledTreectrl.py</a></font></td></tr></table>
<p><tt>Treectrl and MultiListbox widgets with scrollbars.</tt></p>
<p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#aa55cc">
<td colspan=3 valign=bottom> <br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Modules</strong></big></font></td></tr>
<tr><td bgcolor="#aa55cc"><tt> </tt></td><td> </td>
<td width="100%"><table width="100%" summary="list"><tr><td width="25%" valign=top><a href="Tkinter.html">Tkinter</a><br>
</td><td width="25%" valign=top><a href="ttk.html">ttk</a><br>
</td><td width="25%" valign=top></td><td width="25%" valign=top></td></tr></table></td></tr></table><p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ee77aa">
<td colspan=3 valign=bottom> <br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Classes</strong></big></font></td></tr>
<tr><td bgcolor="#ee77aa"><tt> </tt></td><td> </td>
<td width="100%"><dl>
<dt><font face="helvetica, arial"><a href="ttk.html#Frame">ttk.Frame</a>(<a href="ttk.html#Widget">ttk.Widget</a>)
</font></dt><dd>
<dl>
<dt><font face="helvetica, arial"><a href="ScrolledTreectrl.html#ScrolledWidget">ScrolledWidget</a>
</font></dt><dd>
<dl>
<dt><font face="helvetica, arial"><a href="ScrolledTreectrl.html#ScrolledMultiListbox">ScrolledMultiListbox</a>
</font></dt><dt><font face="helvetica, arial"><a href="ScrolledTreectrl.html#ScrolledTreectrl">ScrolledTreectrl</a>
</font></dt></dl>
</dd>
</dl>
</dd>
</dl>
<p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom> <br>
<font color="#000000" face="helvetica, arial"><a name="ScrolledMultiListbox">class <strong>ScrolledMultiListbox</strong></a>(<a href="ScrolledTreectrl.html#ScrolledWidget">ScrolledWidget</a>)</font></td></tr>
<tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td>
<td colspan=2><tt>MultiListbox widget with one or two static or automatic scrollbars.<br>
Subwidgets are:<br>
listbox - TkTreectrl.MultiListbox widget<br>
hbar - horizontal Tkinter.Scrollbar or ttk.Scrollbar<br>
vbar - vertical Tkinter.Scrollbar or ttk.Scrollbar<br>
The widget itself is a Tkinter.<a href="ttk.html#Frame">Frame</a> or ttk.<a href="ttk.html#Frame">Frame</a> with one additional<br>
configuration option:<br>
scrollmode - may be one of "x", "y", "both" or "auto".<br> </tt></td></tr>
<tr><td> </td>
<td width="100%">Methods defined here:<br>
<dl><dt><a name="ScrolledMultiListbox-__init__"><strong>__init__</strong></a>(self, *args, **kw)</dt></dl>
</td></tr></table> <p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom> <br>
<font color="#000000" face="helvetica, arial"><a name="ScrolledTreectrl">class <strong>ScrolledTreectrl</strong></a>(<a href="ScrolledTreectrl.html#ScrolledWidget">ScrolledWidget</a>)</font></td></tr>
<tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td>
<td colspan=2><tt>Treectrl widget with one or two static or automatic scrollbars.<br>
Subwidgets are:<br>
treectrl - TkTreectrl.Treectrl widget<br>
hbar - horizontal Tkinter.Scrollbar or ttk.Scrollbar<br>
vbar - vertical Tkinter.Scrollbar or ttk.Scrollbar<br>
The widget itself is a Tkinter.<a href="ttk.html#Frame">Frame</a> or ttk.<a href="ttk.html#Frame">Frame</a> with one additional<br>
configuration option:<br>
scrollmode - may be one of "x", "y", "both" or "auto".<br> </tt></td></tr>
<tr><td> </td>
<td width="100%">Methods defined here:<br>
<dl><dt><a name="ScrolledTreectrl-__init__"><strong>__init__</strong></a>(self, *args, **kw)</dt></dl>
</td></tr></table> <p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom> <br>
<font color="#000000" face="helvetica, arial"><a name="ScrolledWidget">class <strong>ScrolledWidget</strong></a>(<a href="ttk.html#Frame">ttk.Frame</a>)</font></td></tr>
<tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td>
<td colspan=2><tt>Base class for Tkinter widgets with scrollbars.<br>
The widget is a standard Tkinter.<a href="ttk.html#Frame">Frame</a> or a ttk.<a href="ttk.html#Frame">Frame</a> if ttk is available,<br>
with an additional configuration option SCROLLMODE which may be one of<br>
"x", "y", "both" or "auto".<br>
If SCROLLMODE is one of "x", "y" or "both", one or two static scrollbars<br>
will be drawn. If SCROLLMODE is set to "auto", two automatic scrollbars<br>
that appear only if needed will be drawn.<br>
In order to ensure backwards compatibility, ttk-incompatible configuration<br>
options passed to the widget or to the scrollbars will be silently ignored<br>
if ttk widgets are used.<br>
The Scrollbar widgets can be accessed with the hbar and vbar class<br>
attributes. Derived classes must override the _setScrolledWidget() method,<br>
which must return the widget that will be scrolled and should add a class<br>
attribute that allows to access this widget, so the _setScrolledWidget()<br>
method for a ScrolledListbox widget might look like:<br>
<br>
def _setScrolledWidget(self):<br>
self.<strong>listbox</strong> = Tkinter.Listbox(self)<br>
return self.<strong>listbox</strong><br>
<br>
Note that although it should be possible to create scrolled widget classes<br>
for virtually any Listbox or Canvas alike Tkinter widget you can *not*<br>
safely use this class to add automatic scrollbars to a Text or Text alike<br>
widget. This is because in a scrolled Text widget the value of the<br>
horizontal scrollbar depends only on the visible part of the Text, not on<br>
it's whole contents. Thus it may happen that it is the last visible line of<br>
text that causes the automatic scrollbar to be mapped which then hides this<br>
last line so it will be unmapped again, but then it is requested again and<br>
gets mapped and so on forever. There are strategies to avoid this, but<br>
usually at the cost that there will be situations where the horizontal<br>
scrollbar remains mapped although it is actually not needed. In order to<br>
acomplish this with the <a href="#ScrolledWidget">ScrolledWidget</a> class, at least the _scrollXNow()<br>
and _scrollBothNow() methods must be overridden with appropriate handlers.<br> </tt></td></tr>
<tr><td> </td>
<td width="100%">Methods defined here:<br>
<dl><dt><a name="ScrolledWidget-__getitem__"><strong>__getitem__</strong></a> = <a href="#ScrolledWidget-cget">cget</a>(self, key)</dt></dl>
<dl><dt><a name="ScrolledWidget-__init__"><strong>__init__</strong></a>(self, master<font color="#909090">=None</font>, **kw)</dt></dl>
<dl><dt><a name="ScrolledWidget-cget"><strong>cget</strong></a>(self, key)</dt></dl>
<dl><dt><a name="ScrolledWidget-config"><strong>config</strong></a> = <a href="#ScrolledWidget-configure">configure</a>(self, cnf<font color="#909090">=None</font>, **kw)</dt></dl>
<dl><dt><a name="ScrolledWidget-configure"><strong>configure</strong></a>(self, cnf<font color="#909090">=None</font>, **kw)</dt></dl>
<dl><dt><a name="ScrolledWidget-destroy"><strong>destroy</strong></a>(self)</dt></dl>
<dl><dt><a name="ScrolledWidget-keys"><strong>keys</strong></a>(self)</dt></dl>
</td></tr></table></td></tr></table><p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#55aa55">
<td colspan=3 valign=bottom> <br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Data</strong></big></font></td></tr>
<tr><td bgcolor="#55aa55"><tt> </tt></td><td> </td>
<td width="100%"><strong>__package__</strong> = None</td></tr></table>
</body></html>
|