Base¶
morphui.uix.dataview.base
¶
Base classes for data view components.
This module provides base classes for data view labels and layouts, eliminating code duplication across header, index, and body components.
BaseDataViewLabel(**kwargs)
¶
Bases: RecycleDataViewBehavior, MorphOverlayLayerBehavior, MorphThemeBehavior, MorphContentLayerBehavior, MorphAutoSizingBehavior, BaseLabel
Base class for data view labels.
This class provides the common functionality shared by all data view label types (header, index, and body). It combines several MorphUI behaviors to provide a themed, auto-sizing label with content and overlay layer capabilities.
Subclasses should override the default_config class attribute to
provide specific styling and behavior for their use case.
rv_index = NumericProperty(0)
class-attribute
instance-attribute
¶
The index of this label within the RecycleView data.
:attr:rv_index is a :class:~kivy.properties.NumericProperty
and defaults to 0.
rv = ObjectProperty(None)
class-attribute
instance-attribute
¶
The RecycleView instance managing this label.
:attr:rv is a :class:~kivy.properties.ObjectProperty
and defaults to None.
refresh_view_attrs(rv, index, data)
¶
Refresh the view attributes when the data changes.
This method is called by the RecycleView framework to update the view's attributes based on the provided data.
| PARAMETER | DESCRIPTION |
|---|---|
rv
|
The RecycleView instance managing this view.
TYPE:
|
index
|
The index of this view in the RecycleView data.
TYPE:
|
data
|
The data dictionary for this view.
TYPE:
|
BaseDataView(**kwargs)
¶
Bases: MorphIdentificationBehavior, MorphScrollSyncBehavior, RecycleView
Base class for data view components.
This class combines identification and scroll synchronization behaviors with RecycleView functionality to create a base component suitable for data views.
Subclasses should override the default_config class attribute
to provide specific scroll behavior and sizing for their use case.
Initialize the data view component.
This constructor applies the default configuration and initializes the base RecycleView functionality.
| PARAMETER | DESCRIPTION |
|---|---|
**kwargs
|
Additional keyword arguments for configuration.
TYPE:
|