BaseControl
Base class for all Flet controls and services.
Properties
-
data(Any) –Arbitrary data of any type.
-
key(KeyValue | None) – -
page(Page | BasePage) –The page to which this control belongs to.
-
parent(BaseControl | None) –The direct ancestor(parent) of this control.
Methods
-
before_event–Intercept an event before its handler is executed.
-
is_isolated–Return whether this control is marked as isolated.
-
update–Request a UI update for this control.
Properties#
parent
property
#
parent: BaseControl | None
The direct ancestor(parent) of this control.
It defaults to None and will only have a value when this control is mounted
(added to the page tree).
The Page control (which is the root of the tree) is an exception - it always
has parent=None.
Methods#
before_event
#
before_event(e: ControlEvent)
Intercept an event before its handler is executed.
Return False to cancel dispatch. Return True or None to continue
normal event processing.
is_isolated
#
Return whether this control is marked as isolated.
Isolated controls are excluded from parent-driven update traversal and are expected to manage their own update boundaries.
update
#
Request a UI update for this control.
Call after changing control state or properties. The control must be attached to a page and not marked as frozen.