__init__(self,
id,
label="",
items=None,
types=None,
headers=None,
show_headers=True,
editable=False,
repositioning=False,
expand_columns_indexes=None,
hidden_columns_indexes=None,
cell_format_func=None,
selection_callback=None,
data_changed_callback=None,
expand_policy=None)
(Constructor)
| source code |
Table constructor.
@param id: unique identifier.
@param label: what to show on table frame
@param items: a list (single column) or list of lists (multiple
columns)
@param types: a list of types (str, int, long, float, unicode, bool)
for columns, if omitted, will be guessed from items.
@param headers: what to use as table header.
@param show_headers: whenever to show table headers
@param editable: if table is editable. If editable, user can change
values inline or double-clicking, also edit buttons will
show after the table.
@param repositioning: allow items to be moved up and down.
@param expand_columns_indexes: list of indexes that can expand size
@param cell_format_func: if define, should return a CellFormat with
properties to be applied to cell. Only non-None properties will
be used. Function should have the following signature:
def func( app, table, row, col, value ):
return Table.CellFormat( ... )
where row and col are indexes in table.
@param selection_callback: the function (or list of functions) to
call when selection changes. Function will get as parameters:
- App reference
- Table reference
- List of pairs ( index, row_contents )
@param data_changed_callback: the function (or list of functions) to
call when data changes. Function will get as parameters:
- App reference
- Table reference
- Pair ( index, row_contents )
@param expand_policy: how this widget should fit space, see
L{ExpandPolicy.Policy.Rule}.
@warning: although this widget contains data, it's not a
_EGDataWidget and thus will not notify application that
data changed, also it cannot persist it's data
automatically, if you wish, do it manually. This behavior
may change in future if Table show to be useful as
_EGDataWidget.
-
- Overrides:
_EGWidget.__init__
|