class MultiListbox(Frame): (source)
Constructor: MultiListbox(master, columns, column_weights, cnf, **kw)
A multi-column listbox, where the current selection applies to an entire row. Based on the MultiListbox Tkinter widget recipe from the Python Cookbook (http://code.activestate.com/recipes/52266/)
For the most part, MultiListbox methods delegate to its contained listboxes. For any methods that do not have docstrings, see Tkinter.Listbox for a description of what that method does.
Method | __init__ |
Construct a new multi-column listbox widget. |
Method | __setitem__ |
Configure this widget. This is equivalent to self.configure({key,val)}. See configure(). |
Method | activate |
Undocumented |
Method | bbox |
Return the bounding box for the given table cell, relative to this widget's top-left corner. The bounding box is a tuple of integers (left, top, width, height). |
Method | bind |
Add a binding to each Tkinter.Label and Tkinter.Listbox widget in this mult-column listbox that will call func in response to the event sequence. |
Method | bind |
Add a binding to each Tkinter.Label widget in this mult-column listbox that will call func in response to the event sequence. |
Method | bind |
Add a binding to each Tkinter.Listbox widget in this mult-column listbox that will call func in response to the event sequence. |
Method | columnconfigure |
Configure all table cells in the given column. Valid keyword arguments are: background, bg, foreground, fg, selectbackground, selectforeground. |
Method | configure |
Configure this widget. Use label_* to configure all labels; and listbox_* to configure all listboxes. E.g.: |
Method | curselection |
Undocumented |
Method | delete |
Undocumented |
Method | get |
Return the value(s) of the specified row(s). If last is not specified, then return a single row value; otherwise, return a list of row values. Each row value is a tuple of cell values, one for each column in the row. |
Method | hide |
Hide the given column. The column's state is still maintained: its values will still be returned by get(), and you must supply its values when calling insert(). It is safe to call this on a column that is already hidden. |
Method | index |
Undocumented |
Method | insert |
Insert the given row or rows into the table, at the given index. Each row value should be a tuple of cell values, one for each column in the row. Index may be an integer or any of the special strings (such as ... |
Method | itemcget |
Undocumented |
Method | itemconfigure |
Configure the table cell at the given row and column. Valid keyword arguments are: background, bg, foreground, fg, selectbackground, selectforeground. |
Method | nearest |
Undocumented |
Method | rowconfigure |
Configure all table cells in the given row. Valid keyword arguments are: background, bg, foreground, fg, selectbackground, selectforeground. |
Method | scan |
Undocumented |
Method | scan |
Undocumented |
Method | see |
Undocumented |
Method | select |
Set the selected row. If index is specified, then select row index. Otherwise, if delta is specified, then move the current selection by delta (negative numbers for up, positive numbers for down). This will not move the selection past the top or the bottom of the list. |
Method | selection |
Undocumented |
Method | selection |
Undocumented |
Method | selection |
Undocumented |
Method | selection |
Undocumented |
Method | show |
Display a column that has been hidden using hide_column(). It is safe to call this on a column that is not hidden. |
Method | size |
Undocumented |
Method | yview |
Undocumented |
Method | yview |
Undocumented |
Method | yview |
Undocumented |
Constant | FRAME |
Undocumented |
Constant | LABEL |
Undocumented |
Constant | LISTBOX |
Undocumented |
Property | column |
A tuple containing the Tkinter.Label widgets used to display the label of each column. If this multi-column listbox was created without labels, then this will be an empty tuple. These widgets will all be augmented with a ... |
Property | column |
A tuple containing the names of the columns used by this multi-column listbox. |
Property | listboxes |
A tuple containing the Tkinter.Listbox widgets used to display individual columns. These widgets will all be augmented with a column_index attribute, which can be used to determine which column they correspond to... |
Method | _pagesize |
No summary |
Method | _resize |
Callback used to resize a column of the table. Return True if the column is actually getting resized (if the user clicked on the far left or far right 5 pixels of a label); and False otherwies. |
Method | _resize |
Undocumented |
Method | _resize |
Undocumented |
Method | _scroll |
Undocumented |
Method | _select |
Undocumented |
Instance Variable | _column |
Undocumented |
Instance Variable | _column |
Undocumented |
Instance Variable | _labels |
Undocumented |
Instance Variable | _listboxes |
Undocumented |
Instance Variable | _resize |
Undocumented |
Construct a new multi-column listbox widget.
Parameters | |
master | The widget that should contain the new multi-column listbox. |
columns | Specifies what columns should be included in the new multi-column listbox. If columns is an integer, the it is the number of columns to include. If it is a list, then its length indicates the number of columns to include; and each element of the list will be used as a label for the corresponding column. |
column | Undocumented |
cnf | Undocumented |
cnf, kw | Configuration parameters for this widget. Use label_* to configure all labels; and listbox_* to configure all listboxes. E.g.: >>> mlb = MultiListbox(master, 5, label_foreground='red') |
**kw | Undocumented |
Return the bounding box for the given table cell, relative to this widget's top-left corner. The bounding box is a tuple of integers (left, top, width, height).
Add a binding to each Tkinter.Label and Tkinter.Listbox widget in this mult-column listbox that will call func in response to the event sequence.
Returns | |
A list of the identifiers of replaced binding functions (if any), allowing for their deletion (to prevent a memory leak). |
Add a binding to each Tkinter.Label widget in this mult-column listbox that will call func in response to the event sequence.
Returns | |
A list of the identifiers of replaced binding functions (if any), allowing for their deletion (to prevent a memory leak). |
Add a binding to each Tkinter.Listbox widget in this mult-column listbox that will call func in response to the event sequence.
Returns | |
A list of the identifiers of replaced binding functions (if any), allowing for their deletion (to prevent a memory leak). |
Configure all table cells in the given column. Valid keyword arguments are: background, bg, foreground, fg, selectbackground, selectforeground.
Configure this widget. Use label_* to configure all labels; and listbox_* to configure all listboxes. E.g.:
>>> mlb = MultiListbox(master, 5) >>> mlb.configure(label_foreground='red') >>> mlb.configure(listbox_foreground='red')
Return the value(s) of the specified row(s). If last is not specified, then return a single row value; otherwise, return a list of row values. Each row value is a tuple of cell values, one for each column in the row.
Hide the given column. The column's state is still maintained: its values will still be returned by get(), and you must supply its values when calling insert(). It is safe to call this on a column that is already hidden.
See Also | |
show_column() |
Insert the given row or rows into the table, at the given index. Each row value should be a tuple of cell values, one for each column in the row. Index may be an integer or any of the special strings (such as 'end') accepted by Tkinter.Listbox.
Configure the table cell at the given row and column. Valid keyword arguments are: background, bg, foreground, fg, selectbackground, selectforeground.
Configure all table cells in the given row. Valid keyword arguments are: background, bg, foreground, fg, selectbackground, selectforeground.
Set the selected row. If index is specified, then select row index. Otherwise, if delta is specified, then move the current selection by delta (negative numbers for up, positive numbers for down). This will not move the selection past the top or the bottom of the list.
Parameters | |
index | Undocumented |
delta | Undocumented |
see | If true, then call self.see() with the newly selected index, to ensure that it is visible. |
Display a column that has been hidden using hide_column(). It is safe to call this on a column that is not hidden.
Undocumented
Value |
|
Undocumented
Value |
|
A tuple containing the Tkinter.Label widgets used to display the label of each column. If this multi-column listbox was created without labels, then this will be an empty tuple. These widgets will all be augmented with a column_index attribute, which can be used to determine which column they correspond to. This can be convenient, e.g., when defining callbacks for bound events.
A tuple containing the Tkinter.Listbox widgets used to display individual columns. These widgets will all be augmented with a column_index attribute, which can be used to determine which column they correspond to. This can be convenient, e.g., when defining callbacks for bound events.