DataCell
Examples#
See these.
DataCell
#
Bases: Control
The data for a cell of a DataTable.
| RAISES | DESCRIPTION |
|---|---|
AssertionError
|
If the |
content
#
content: StrOrControl
The content of this cell.
Typically a Text control or a Dropdown control.
If the cell has no data, then a Text control with placeholder text
should be provided instead, and placeholder should be set to
True.
on_double_tap
#
on_double_tap: ControlEventHandler[DataCell] | None = None
Called when this cell is double tapped.
Note
If this is None (including on_tap, on_long_press,
on_tap_cancel, on_tap_down), tapping this cell will
attempt to select its row (if DataRow.on_select_change is provided).
on_long_press
#
on_long_press: ControlEventHandler[DataCell] | None = None
Called if this cell is long-pressed.
Note
If this is None (including on_tap, on_double_tap,
on_tap_cancel, on_tap_down), tapping this cell will attempt
to select its row (if DataRow.on_select_change is provided).
on_tap
#
on_tap: ControlEventHandler[DataCell] | None = None
Called if this cell is tapped.
Note
If this is None (including on_double_tap, on_long_press,
on_tap_cancel, on_tap_down), tapping this cell will
attempt to select its row (if DataRow.on_select_change is provided).
on_tap_cancel
#
on_tap_cancel: ControlEventHandler[DataCell] | None = None
Called if the user cancels a tap was started on cell.
Note
If this is None (including on_tap, on_double_tap,
on_long_press, on_tap_down), tapping this cell will
attempt to select its row (if DataRow.on_select_change is provided).
on_tap_down
#
on_tap_down: EventHandler[TapEvent[DataCell]] | None = None
Called if this cell is tapped down.
Note
If this is None (including on_tap, on_double_tap,
on_long_press, on_tap_cancel), tapping this cell will
attempt to select its row (if DataRow.on_select_change is provided).
placeholder
#
placeholder: bool = False
Whether the content is actually a placeholder.
If this is True, the default text style for the cell is changed to be appropriate
for placeholder text.