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 146 147 148 149 150 151 152 153 154 155 156
|
<!doctype html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html><head><title>Python: module MultiListbox</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>MultiListbox</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/MultiListbox.py">./TkTreectrl/MultiListbox.py</a></font></td></tr></table>
<p><tt>A flexible multi column listbox widget for Tkinter.</tt></p>
<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="TkTreectrl.Treectrl.html#Treectrl">TkTreectrl.Treectrl.Treectrl</a>(<a href="Tkinter.html#Widget">Tkinter.Widget</a>)
</font></dt><dd>
<dl>
<dt><font face="helvetica, arial"><a href="MultiListbox.html#MultiListbox">MultiListbox</a>
</font></dt></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="MultiListbox">class <strong>MultiListbox</strong></a>(<a href="TkTreectrl.Treectrl.html#Treectrl">TkTreectrl.Treectrl.Treectrl</a>)</font></td></tr>
<tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td>
<td colspan=2><tt>A flexible multi column listbox widget for Tkinter.<br>
Based on the <a href="TkTreectrl.Treectrl.html#Treectrl">Treectrl</a> widget, it offers the following additional<br>
configuration options:<br>
<br>
columns - a sequence of strings that defines the number of<br>
columns of the widget. The strings will be used in<br>
the columnheader lines (default: (' ',)).<br>
command - an optional command that will be executed when the<br>
user double-clicks into the listbox or presses the<br>
Return key. The listbox index of the item that was<br>
clicked on resp. of the currently active item is<br>
passed as argument to the callback; if there is no<br>
item at the event coordinates resp. no active item<br>
exists, this index will be -1 (default: None).<br>
expandcolumns - a sequence of integers defining the columns that<br>
should expand horizontally beyond the requested<br>
size when the widget is resized (note that the<br>
rightmost column will always expand) (default: ()).<br>
selectcmd - an optional callback that will be executed when the<br>
selection of the listbox changes. A tuple<br>
containing the indices of the currently selected<br>
items as returned by <a href="#MultiListbox-curselection">curselection</a>() will be passed<br>
to the callback (default: None).<br>
selectbackground - the background color to use for the selection<br>
rectangle (default: #00008B).<br>
selectforeground - the foreground color to use for selected text<br>
(default: white).<br>
<br>
By default, the widget uses one pre-defined style for all columns; the<br>
widget's <a href="#MultiListbox-style">style</a>() method allows to access and configure the default style,<br>
as well as applying new user-defined styles per column.<br>
The default style defines two elements, "text" and "select" (which<br>
describes attributes of the selection rectangle); these may be accessed<br>
and configured with the <a href="#MultiListbox-element">element</a>() method. Conversion between listbox<br>
indices and treectrl item descriptors can be done with the <a href="#MultiListbox-item">item</a>() and<br>
<a href="#MultiListbox-index">index</a>() widget methods. Besides this, most common operations can be done<br>
with methods identical or very similar to those of a Tkinter.Listbox, with<br>
the exception of the selection_xxx() methods, where the treectrl methods<br>
are kept intact; for Tkinter.Listbox alike methods, use select_xxx().<br> </tt></td></tr>
<tr><td> </td>
<td width="100%">Methods defined here:<br>
<dl><dt><a name="MultiListbox-__getitem__"><strong>__getitem__</strong></a> = <a href="#MultiListbox-cget">cget</a>(self, key)</dt></dl>
<dl><dt><a name="MultiListbox-__init__"><strong>__init__</strong></a>(self, master<font color="#909090">=None</font>, columns<font color="#909090">=(' ',)</font>, selectcmd<font color="#909090">=None</font>, command<font color="#909090">=None</font>, expandcolumns<font color="#909090">=()</font>, showroot<font color="#909090">=False</font>, selectforeground<font color="#909090">='white'</font>, selectbackground<font color="#909090">='#00008B'</font>, **kw)</dt></dl>
<dl><dt><a name="MultiListbox-activate"><strong>activate</strong></a>(self, index)</dt><dd><tt>Like Tkinter.Listbox.<a href="#MultiListbox-activate">activate</a>(). Note that this overrides the<br>
<a href="#MultiListbox-activate">activate</a>() method inherited from <a href="TkTreectrl.Treectrl.html#Treectrl">Treectrl</a>.</tt></dd></dl>
<dl><dt><a name="MultiListbox-bbox"><strong>bbox</strong></a>(self, index, column<font color="#909090">=None</font>, element<font color="#909090">=None</font>)</dt><dd><tt>Like <a href="#MultiListbox-item_bbox">item_bbox</a>(), except that it requires a listbox index instead<br>
of a treectrl item descriptor as argument. Note that this overrides the<br>
<a href="#MultiListbox-bbox">bbox</a>() method inherited from <a href="TkTreectrl.Treectrl.html#Treectrl">Treectrl</a>.</tt></dd></dl>
<dl><dt><a name="MultiListbox-cget"><strong>cget</strong></a>(self, key)</dt></dl>
<dl><dt><a name="MultiListbox-column"><strong>column</strong></a>(self, index)</dt><dd><tt>Return the column identifier for the column at INDEX.</tt></dd></dl>
<dl><dt><a name="MultiListbox-config"><strong>config</strong></a> = <a href="#MultiListbox-configure">configure</a>(self, cnf<font color="#909090">=None</font>, **kw)</dt></dl>
<dl><dt><a name="MultiListbox-configure"><strong>configure</strong></a>(self, cnf<font color="#909090">=None</font>, **kw)</dt></dl>
<dl><dt><a name="MultiListbox-curselection"><strong>curselection</strong></a>(self)</dt><dd><tt>Like Tkinter.Listbox.<a href="#MultiListbox-curselection">curselection</a>().</tt></dd></dl>
<dl><dt><a name="MultiListbox-delete"><strong>delete</strong></a>(self, first, last<font color="#909090">=None</font>)</dt><dd><tt>Like Tkinter.Listbox.<a href="#MultiListbox-delete">delete</a>() except that an additional index<br>
descriptor ALL may be used, so that <a href="#MultiListbox-delete">delete</a>(ALL) is equivalent with<br>
<a href="#MultiListbox-delete">delete</a>(0, END).</tt></dd></dl>
<dl><dt><a name="MultiListbox-element"><strong>element</strong></a>(self, element)</dt><dd><tt>Return the treectrl element corresponding to ELEMENT.<br>
ELEMENT may be "text" or "select".</tt></dd></dl>
<dl><dt><a name="MultiListbox-get"><strong>get</strong></a>(self, first, last<font color="#909090">=None</font>)</dt><dd><tt>Like Tkinter.Listbox.<a href="#MultiListbox-get">get</a>(), except that each element of the returned<br>
tuple is a tuple instead of a string; each of these tuples contains the<br>
text strings per column of a listbox item.</tt></dd></dl>
<dl><dt><a name="MultiListbox-index"><strong>index</strong></a>(self, which<font color="#909090">=None</font>, item<font color="#909090">=None</font>)</dt><dd><tt>Like Tkinter.Listbox.<a href="#MultiListbox-index">index</a>(), except that if ITEM is specified, the<br>
listbox index for the treectrl item descriptor ITEM is returned.</tt></dd></dl>
<dl><dt><a name="MultiListbox-insert"><strong>insert</strong></a>(self, index, *args)</dt><dd><tt>Similar to Tkinter.Listbox.<a href="#MultiListbox-insert">insert</a>(), except that instead of one<br>
string a number of strings equal to the number of columns must be given<br>
as arguments. It is an error to specify more or fewer arguments than<br>
the number of columns. Returns the ID of the newly created item, as<br>
returned by <a href="#MultiListbox-item_create">item_create</a>().</tt></dd></dl>
<dl><dt><a name="MultiListbox-item"><strong>item</strong></a>(self, index)</dt><dd><tt>Return the treectrl item descriptor for the item at INDEX.</tt></dd></dl>
<dl><dt><a name="MultiListbox-keys"><strong>keys</strong></a>(self)</dt></dl>
<dl><dt><a name="MultiListbox-nearest"><strong>nearest</strong></a>(self, y)</dt><dd><tt>Like Tkinter.Listbox.<a href="#MultiListbox-nearest">nearest</a>().</tt></dd></dl>
<dl><dt><a name="MultiListbox-numcolumns"><strong>numcolumns</strong></a>(self)</dt><dd><tt>Return the number of listbox columns.</tt></dd></dl>
<dl><dt><a name="MultiListbox-see"><strong>see</strong></a>(self, index, column<font color="#909090">=None</font>, center<font color="#909090">=None</font>)</dt><dd><tt>Like Tkinter.Listbox.<a href="#MultiListbox-see">see</a>(). Note that this overrides the<br>
<a href="#MultiListbox-see">see</a>() method inherited from <a href="TkTreectrl.Treectrl.html#Treectrl">Treectrl</a>.</tt></dd></dl>
<dl><dt><a name="MultiListbox-select_anchor"><strong>select_anchor</strong></a>(self, index<font color="#909090">=None</font>)</dt><dd><tt>Like Tkinter.Listbox.<a href="#MultiListbox-select_anchor">select_anchor</a>(), except that it if no INDEX is<br>
specified the current selection anchor will be returned.</tt></dd></dl>
<dl><dt><a name="MultiListbox-select_clear"><strong>select_clear</strong></a>(self, first<font color="#909090">=None</font>, last<font color="#909090">=None</font>)</dt><dd><tt>Like Tkinter.Listbox.<a href="#MultiListbox-select_clear">select_clear</a>(), except that if no arguments are<br>
specified, all items will be deleted, so that <a href="#MultiListbox-select_clear">select_clear</a>() is<br>
equivalent with <a href="#MultiListbox-select_clear">select_clear</a>(0, END).</tt></dd></dl>
<dl><dt><a name="MultiListbox-select_includes"><strong>select_includes</strong></a>(self, index)</dt><dd><tt>Like Tkinter.Listbox.<a href="#MultiListbox-select_includes">select_includes</a>().</tt></dd></dl>
<dl><dt><a name="MultiListbox-select_set"><strong>select_set</strong></a>(self, first, last<font color="#909090">=None</font>)</dt><dd><tt>Like Tkinter.Listbox.<a href="#MultiListbox-select_set">select_set</a>().</tt></dd></dl>
<dl><dt><a name="MultiListbox-size"><strong>size</strong></a>(self)</dt><dd><tt>Like Tkinter.Listbox.<a href="#MultiListbox-size">size</a>().</tt></dd></dl>
<dl><dt><a name="MultiListbox-sort"><strong>sort</strong></a>(self, column<font color="#909090">=None</font>, element<font color="#909090">=None</font>, first<font color="#909090">=None</font>, last<font color="#909090">=None</font>, mode<font color="#909090">=None</font>, command<font color="#909090">=None</font>, notreally<font color="#909090">=False</font>)</dt><dd><tt>Like <a href="#MultiListbox-item_sort">item_sort</a>(), except that the item descriptor defaults to ROOT<br>
(which is most likely wanted) and that the FIRST and LAST options<br>
require listbox indices instead of treectrl item descriptors.</tt></dd></dl>
<dl><dt><a name="MultiListbox-style"><strong>style</strong></a>(self, index, newstyle<font color="#909090">=None</font>)</dt><dd><tt>If NEWSTYLE is specified, set the style for the column at INDEX to<br>
NEWSTYLE. Return the style identifier for the column at INDEX.</tt></dd></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>
|