KeyedChildren
Keyed access to the children of a composed anylumino widget.
Lumino layout widgets and Astryx widgets share this base. Children are
stored as a synced widgets list of rendered views plus a parallel
child_keys list. get_widget returns the view that renders in the
browser and get_owner returns the object that was passed in, so
wrapper objects exposing a widget attribute keep their own API.
Subscripting returns the owner. Widgets with a selected_index trait
also gain selected_key and select_key.
Attributes
attributewidgetslist[Any]attributechild_keyslist[str]attributetitleslist[str]attributeselected_keystr | Noneattributeselected_widgetobject | Noneattributeselected_ownerobject | NoneFunctions
funcget_index(key) -> intparamkeystrReturns
intfuncget_key(index) -> strparamindexintReturns
strfuncget_widget(key_or_index) -> objectparamkey_or_indexstr | intReturns
objectfuncget_owner(key_or_index) -> objectparamkey_or_indexstr | intReturns
objectfuncselect_key(key) -> NoneparamkeystrReturns
Nonefuncapply_widget(key_or_index, callback) -> Anyparamkey_or_indexstr | intparamcallbackCallable[[object], Any]Returns
typing.Anyfuncapply_owner(key_or_index, callback) -> Anyparamkey_or_indexstr | intparamcallbackCallable[[object], Any]Returns
typing.Anyfunccall_widget(key_or_index, method_name, *args, **kwargs) -> Anyparamkey_or_indexstr | intparammethod_namestrparamargsAny= ()paramkwargsAny= {}Returns
typing.Anyfunccall_owner(key_or_index, method_name, *args, **kwargs) -> Anyparamkey_or_indexstr | intparammethod_namestrparamargsAny= ()paramkwargsAny= {}Returns
typing.Anyfuncadd(key, widget, *, title=None, select=False) -> Noneparamkeystrparamwidgetobjectparamtitlestr | None= Noneparamselectbool= FalseReturns
Nonefuncadd_widget(widget, title=None, *, key=None, select=False) -> Noneparamwidgetobjectparamtitlestr | None= Noneparamkeystr | None= Noneparamselectbool= FalseReturns
Nonefuncremove_widget(key_or_index, *, close=False) -> objectRemove a child and return the owner that was passed in.
Pass close=True to also close the removed widget models. Closing
releases them from the ipywidgets registry and makes them unusable, so
the default keeps the returned owner alive for the caller to reuse.
paramkey_or_indexstr | intparamclosebool= FalseReturns
objectfuncmove_widget(key_or_index, index) -> NoneMove a child to a new position, keeping keys and titles aligned.
paramkey_or_indexstr | intparamindexintReturns
Nonefuncrename_widget(key_or_index, title) -> Noneparamkey_or_indexstr | intparamtitlestrReturns
None