ae.kivy_iterable_displayer
iterable displayer widget
The popup widget provided by this ae namespace portion displays items and sub-items of any type of iterables, like dicts, lists, sets and tuples.
iterable displayer usage
To open a popup displaying the keys/indexes and values of an iterable simple instantiate
IterableDisplayerPopup
. You can specify a popup window title string via the title kwarg and pass the iterable
to the data kwarg (or property):
dict_displayer = IterableDisplayerPopup(title="popup window title", data=iterable_data)
A widget will be automatically instantiated for each sub-item of iterable_data to display the item key and value.
The used widget class is depending on the type of the sub-item. For non-iterable sub-items the IterableDisplayerLabel
widget will be used. If instead a sub-item is containing another iterable then IterableDisplayerPopup
will use
the IterableDisplayerButton class, which when tapped displays another instance of IterableDisplayerPopup
with the sub-sub-items.
Classes
|
FlowPopup displaying iterable data - useful for quick prototyping and debugging. |
- class IterableDisplayerPopup(**kwargs)[source]
Bases:
FlowPopup
FlowPopup displaying iterable data - useful for quick prototyping and debugging.
- data
the iterable (dict, list, set, tuple) from which the items will be shown
- _container: Widget
- attach_to: Optional[Widget]
- _layout_finished: bool
- _opened_item: Optional[Widget]
- _touch_moved_outside: bool