SourceClass CollapsingHeader
from egui import CollapsingHeaderclass CollapsingHeader:A header which can be collapsed/expanded, revealing a contained Ui region.
If you want to customize the header contents, see CollapsingState.show_header.
Methods§
Sourcedef default_open(self, /, default_open: bool) -> CollapsingHeader§
By default, the CollapsingHeader is collapsed.
Call .default_open(True) to change this.
Sourcedef enabled(self, /, enabled: bool) -> CollapsingHeader§
If you set this to False, the CollapsingHeader will be grayed out and un-clickable.
This is a convenience for Ui.disable.
Sourcedef id_salt(self, /, id_salt: str) -> CollapsingHeader§
Explicitly set the source of the Id of this widget, instead of using title label.
This is useful if the title label is dynamic or not unique.
def id_source(self, /, id_source: str) -> CollapsingHeader§
Sourcedef open(self, /, open: bool) -> CollapsingHeader§
Calling .open(Some(True)) will make the collapsing header open this frame (or stay open).
Calling .open(Some(False)) will make the collapsing header close this frame (or stay closed).
Calling .open(None) has no effect (default).
Sourcedef show(self, /) -> Any§
To show a CollapsingHeader, call .show() wrapped within async with (...) as collapsing_ui:. You can use another variable name instead of collapsing_ui. You can then create widgets inside the CollapsingHeader's ui as if it was a regular ui.
Sourcedef show_background(self, /, show_background: bool) -> CollapsingHeader§
Should the CollapsingHeader show a background behind it? Default: False.
To show it behind all CollapsingHeader you can just use: