S or /

SourceClass Classes

from egui import Classes
class Classes:

Classes is a collection of ClassNames that can be added to widgets or containers.

This can be used by styling engine to compute a different style based on the set of classes present on the widget/Ui. You could also use it to e.g. change widget behavior based on the context of some container.

Class order is preserved and may be used by a style provider for precedence (last class should win).

Use HasClasses to add/modify classes.

Methods§

def add_class(self, /, class: str) -> None§
def add_class_if(self, /, class: str, condition: bool) -> None§
@staticmethod def default() -> Classes§
def has(self, /, class: str) -> bool§