Layout

Widgets for controlling layout.

Summary

VSpacing

Adds vertical spacing.

HAlignNext

Places a widget on the same line as the previous widget.

Dummy

Adds a spacer or ‘dummy’ widget.

group_horizontal

Shortcut constructor for Group(horizontal=True)

Group

Grouped widgets behave as a single unit when acted on by other layout widgets.

ColumnLayout

Places contents into columns.

IndentLayout

Adds an indent to contained items.

ChildView

Adds an embedded child window with optional scollbars.

Simple Layout

class dearpygui_obj.layout.VSpacing(**config)[source]

Bases: dearpygui_obj.wrapper.widget.Widget, dearpygui_obj.wrapper.widget.ItemWidgetMx

Adds vertical spacing.

space: int

The amount of vertical space.

class dearpygui_obj.layout.HAlignNext(**config)[source]

Bases: dearpygui_obj.wrapper.widget.Widget, dearpygui_obj.wrapper.widget.ItemWidgetMx

Places a widget on the same line as the previous widget. Can also be used for horizontal spacing.

xoffset: float

offset from containing window

spacing: float

offset from previous widget

class dearpygui_obj.layout.Dummy(**config)[source]

Bases: dearpygui_obj.wrapper.widget.Widget, dearpygui_obj.wrapper.widget.ItemWidgetMx

Adds a spacer or ‘dummy’ widget.

Containers

dearpygui_obj.layout.group_horizontal(spacing: float = - 1, **config: Any) Group[source]

Shortcut constructor for Group(horizontal=True)

class dearpygui_obj.layout.Group(**config)[source]

Bases: dearpygui_obj.wrapper.widget.Widget, dearpygui_obj.wrapper.widget.ItemWidgetMx, dearpygui_obj.wrapper.widget.ContainerWidgetMx[Group]

Grouped widgets behave as a single unit when acted on by other layout widgets.

They can optionally have their contents flow horizontally instead of vertically.

horizontal: bool

Read or modify the ‘horizontal’ config property.

horizontal_spacing: float

Read or modify the ‘horizontal_spacing’ config property.

class dearpygui_obj.layout.ColumnLayout(columns: int = 2, **config)[source]

Bases: dearpygui_obj.wrapper.widget.Widget, dearpygui_obj.wrapper.widget.ItemWidgetMx, dearpygui_obj.wrapper.widget.ContainerWidgetMx[ColumnLayout]

Places contents into columns.

Each new widget added will be placed in the next column, wrapping around to the start.

columns: int

Number of columns.

border: bool

Draw a border between columns.

property column_widths: Sequence[float]

Get or set column widths as a sequence of floats.

get_column_width(col_idx: int) float[source]

Get an individual column width.

set_column_width(col_idx: int, width: float) None[source]

Set an individual column width.

class dearpygui_obj.layout.IndentLayout(**config)[source]

Bases: dearpygui_obj.wrapper.widget.Widget, dearpygui_obj.wrapper.widget.ItemWidgetMx, dearpygui_obj.wrapper.widget.ContainerWidgetMx[IndentLayout]

Adds an indent to contained items.

offset: float

Read or modify the ‘offset’ config property.

class dearpygui_obj.layout.ChildView(*, id: Optional[int] = 0, callback: PyGuiCallback = None, **kwargs: Any)[source]

Bases: dearpygui_obj.wrapper.widget.Widget, dearpygui_obj.wrapper.widget.ItemWidgetMx, dearpygui_obj.wrapper.widget.ContainerWidgetMx[ChildView]

Adds an embedded child window with optional scollbars.

border: bool

Read or modify the ‘border’ config property.

autosize_x: bool

Read or modify the ‘autosize_x’ config property.

autosize_y: bool

Read or modify the ‘autosize_y’ config property.

menubar: bool

Read or modify the ‘menubar’ config property.

no_scrollbar: bool

Disable scrollbars (can still scroll with mouse or programmatically).

horizontal_scrollbar: bool

Allow horizontal scrollbar to appear.