S or /

SourceClass Sides

from egui import Sides
class Sides:

Put some widgets on the left and right sides of a ui.

The result will look like this:

The width of the gap is dynamic, based on the max width of the parent Ui. When the parent is being auto-sized (Ui.is_sizing_pass) the gap will be as small as possible.

If the parent is not wide enough to fit all widgets, the parent will be expanded to the right.

The left widgets are added left-to-right. The right widgets are added right-to-left.

Which side is first depends on the configuration: - Sides.extend - left widgets are added first - Sides.shrink_left - right widgets are added first - Sides.shrink_right - left widgets are added first

Methods§

Sourcedef extend(self, /) -> Sides§

Extend the left and right sides to fill the available space.

This is the default behavior. The left widgets will be added first, followed by the right widgets.

Sourcedef height(self, /, height: float) -> Sides§

The minimum height of the sides.

The content will be centered vertically within this height. The default height is egui.Spacing.interact_size.y.

Source@staticmethod def new() -> Sides§
Sourcedef show(self, /, target: Any) -> Any§
Sourcedef shrink_left(self, /) -> Sides§

Try to shrink widgets on the left side.

Right widgets will be added first. The left Uis max rect will be limited to the remaining space.

Sourcedef shrink_right(self, /) -> Sides§

Try to shrink widgets on the right side.

Left widgets will be added first. The right Uis max rect will be limited to the remaining space.

Sourcedef spacing(self, /, spacing: float) -> Sides§

The horizontal spacing between the left and right UIs.

This is the minimum gap. The default is egui.Spacing.item_spacing.x.

Sourcedef truncate(self, /) -> Sides§

Truncate the text on the shrinking side.

This is a shortcut for egui.Sides.wrap_mode. Does nothing if egui.Sides.extend is used (the default).

Sourcedef wrap(self, /) -> Sides§

Wrap the text on the shrinking side.

This is a shortcut for egui.Sides.wrap_mode. Does nothing if egui.Sides.extend is used (the default).

Sourcedef wrap_mode(self, /, wrap_mode: TextWrapMode) -> Sides§

The text wrap mode for the shrinking side.

Does nothing if egui.Sides.extend is used (the default).