Containers

Summary

TreeNode

A collapsing container with a label.

TreeNodeHeader

Similar to TreeNode, but the label is visually emphasized.

TabBar

A container that allows switching between different tabs.

TabItem

A container whose contents will be displayed when selected in a TabBar.

TabButton

A button that can be added to a TabBar.

TabOrderMode

Specifies the ordering behavior of a tab items.

Menu

A menu containing MenuItem objects.

MenuItem

An item for a Menu.

Popup

A container that appears when a Widget is interacted with.

PopupInteraction

Specifies the trigger for a Popup.

Tree Nodes

class dearpygui_obj.containers.TreeNode(label: Optional[str] = None, **config)[source]

Bases: dearpygui_obj.wrapper.widget.Widget, dearpygui_obj.wrapper.widget.ItemWidgetMx, dearpygui_obj.wrapper.widget.ContainerWidgetMx[TreeNode], dearpygui_obj.wrapper.widget.ValueWidgetMx[bool]

A collapsing container with a label.

value: bool

True if the header is uncollapsed, otherwise False.

label: str

Read or modify the ‘label’ config property.

closable: bool

Read or modify the ‘closable’ config property.

default_open: bool

Read or modify the ‘default_open’ config property.

bullet: bool

Display a bullet instead of arrow.

open_on_double_click: bool

If True, a double click is needed to toggle

open_on_arrow: bool

If True, the user must click on the arrow/bullet to toggle

is_leaf: bool

If True, the header is always open and cannot be collapsed, and the arrow/bullet not shown (use as a convenience for leaf nodes).

class dearpygui_obj.containers.TreeNodeHeader(label: Optional[str] = None, **config)[source]

Bases: dearpygui_obj.containers.TreeNode, dearpygui_obj.wrapper.widget.ContainerWidgetMx[TreeNodeHeader]

Similar to TreeNode, but the label is visually emphasized.

value: bool

True if the header is uncollapsed, otherwise False.

Tabs

class dearpygui_obj.containers.TabBar(**config)[source]

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

A container that allows switching between different tabs.

Note

This container should only contain TabItem or TabButton elements.

reorderable: bool

Read or modify the ‘reorderable’ config property.

class dearpygui_obj.containers.TabItem(label: Optional[str] = None, **config)[source]

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

A container whose contents will be displayed when selected in a TabBar.

Note

This widget must be placed inside a TabBar to be visible.

label: str

Read or modify the ‘label’ config property.

closable: bool

Create a button on the tab that can hide the tab.

order_mode: TabOrderMode

Read or modify the ‘order_mode’ config property.

no_tooltip: bool

Disable tooltip

class dearpygui_obj.containers.TabButton(label: Optional[str] = None, **config)[source]

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

A button that can be added to a TabBar.

Note

This widget must be placed inside a TabBar to be visible.

label: str

Read or modify the ‘label’ config property.

closable: bool

Create a button on the tab that can hide the tab.

order_mode: TabOrderMode

Read or modify the ‘order_mode’ config property.

no_tooltip: bool

Disable tooltip

class dearpygui_obj.containers.TabOrderMode(value)[source]

Bases: enum.Enum

Specifies the ordering behavior of a tab items.

Reorderable = None

Default

Fixed = 'no_reorder'

Disable reordering this tab or having another tab cross over this tab

Leading = 'leading'

Enforce the tab position to the left of the tab bar (after the tab list popup button)

Trailing = 'trailing'

Enforce the tab position to the right of the tab bar (before the scrolling buttons)

Popups

class dearpygui_obj.containers.Popup(parent: dearpygui_obj.wrapper.widget.Widget, **config)[source]

Bases: dearpygui_obj.wrapper.widget.Widget, dearpygui_obj.wrapper.widget.ContainerWidgetMx[Popup]

A container that appears when a Widget is interacted with.

trigger: PopupInteraction

The interaction that will trigger the popup.

modal: bool

Prevent the user from interacting with other windows until the popup is closed.

property parent: dearpygui_obj.wrapper.widget.Widget

The ItemWidgetMx that the popup is attached to. Cannot be changed.

close() None[source]

Closes the popup.

Node:

Modal popups cannot be closed except by using this method.

class dearpygui_obj.containers.PopupInteraction(value)[source]

Bases: enum.Enum

Specifies the trigger for a Popup.

MouseLeft = 0
MouseRight = 1
MouseMiddle = 2
MouseX1 = 3
MouseX2 = 4