__init__(self,
id,
label,
items=None,
types=None,
headers=None,
show_headers=True,
editable=False,
expand_columns_indexes=None,
selection_callback=None,
data_changed_callback=None)
(Constructor)
| source code |
Table constructor.
-
- Parameters:
id - unique identifier.
label - what to show on table frame
items - a list (single column) or list of lists (multiple columns)
types - a list of types (str, int, long, float, unicode, bool) for
columns, if omitted, will be guessed from items.
headers - what to use as table header.
show_headers - whenever to show table headers
editable - if table is editable. If editable, user can change values
inline or double-clicking, also edit buttons will show after the
table.
expand_columns_indexes - list of indexes that can expand size
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 )
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 )
- Overrides:
_EGWidget.__init__
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.
|