Input Widgets

Widgets for inputting values.

Input Boxes

Summary

InputText

A text input box.

InputFloat

A float input box.

InputFloat2

An input box for 2 floats.

InputFloat3

An input box for 3 floats.

InputFloat4

An input box for 4 floats.

InputInt

An integer input box.

InputInt2

An input box for 2 ints.

InputInt3

An input box for 3 ints.

InputInt4

An input box for 4 ints.

Text Input

class dearpygui_obj.input.InputText(label: Optional[str] = None, value: str = '', **config)[source]

Bases: dearpygui_obj.wrapper.widget.Widget, dearpygui_obj.wrapper.widget.ItemWidgetMx, dearpygui_obj.wrapper.widget.ValueWidgetMx[str]

A text input box.

value: str

The inputted text.

hint: str

Read or modify the ‘hint’ config property.

multiline: bool

Read or modify the ‘multiline’ config property.

no_spaces: bool

Read or modify the ‘no_spaces’ config property.

uppercase: bool

Read or modify the ‘uppercase’ config property.

tab_input: bool

Read or modify the ‘tab_input’ config property.

decimal: bool

Read or modify the ‘decimal’ config property.

hexadecimal: bool

Read or modify the ‘hexadecimal’ config property.

readonly: bool

Read or modify the ‘readonly’ config property.

password: bool

Read or modify the ‘password’ config property.

scientific: bool

Read or modify the ‘scientific’ config property.

label: str

Read or modify the ‘label’ config property.

on_enter: bool

Read or modify the ‘on_enter’ config property.

Number Input

class dearpygui_obj.input.NumberInput(label: Optional[str] = None, value: Optional[dearpygui_obj.input._TInput] = None, **config)[source]

Bases: Generic[dearpygui_obj.input._TElem, dearpygui_obj.input._TInput], dearpygui_obj.wrapper.widget.Widget, dearpygui_obj.wrapper.widget.ItemWidgetMx, dearpygui_obj.wrapper.widget.ValueWidgetMx[dearpygui_obj.input._TInput]

Base class for number input boxes.

value: _TInput

The inputted value.

format: str

Read or modify the ‘format’ config property.

on_enter: bool

Read or modify the ‘on_enter’ config property.

step: _TElem

Read or modify the ‘step’ config property.

step_fast: _TElem

Read or modify the ‘step_fast’ config property.

readonly: bool

Read or modify the ‘readonly’ config property.

label: str

Read or modify the ‘label’ config property.

min_value: Optional[_TElem]

Read or modify the ‘min_value’ config property.

max_value: Optional[_TElem]

Read or modify the ‘max_value’ config property.

Float Input

class dearpygui_obj.input.InputFloat(label: Optional[str] = None, value: Optional[dearpygui_obj.input._TInput] = None, **config)[source]

Bases: dearpygui_obj.input.NumberInput[float, float]

A float input box.

value: _TInput

The inputted value.

class dearpygui_obj.input.InputFloat2(label: Optional[str] = None, value: Optional[dearpygui_obj.input._TInput] = None, **config)[source]

Bases: dearpygui_obj.input.NumberInput[float, Tuple[float, float]]

An input box for 2 floats.

value: _TInput

The inputted value.

class dearpygui_obj.input.InputFloat3(label: Optional[str] = None, value: Optional[dearpygui_obj.input._TInput] = None, **config)[source]

Bases: dearpygui_obj.input.NumberInput[float, Tuple[float, float, float]]

An input box for 3 floats.

value: _TInput

The inputted value.

class dearpygui_obj.input.InputFloat4(label: Optional[str] = None, value: Optional[dearpygui_obj.input._TInput] = None, **config)[source]

Bases: dearpygui_obj.input.NumberInput[float, Tuple[float, float, float, float]]

An input box for 4 floats.

value: _TInput

The inputted value.

Integer Input

class dearpygui_obj.input.InputInt(label: Optional[str] = None, value: Optional[dearpygui_obj.input._TInput] = None, **config)[source]

Bases: dearpygui_obj.input.NumberInput[int, int]

An integer input box.

value: _TInput

The inputted value.

class dearpygui_obj.input.InputInt2(label: Optional[str] = None, value: Optional[dearpygui_obj.input._TInput] = None, **config)[source]

Bases: dearpygui_obj.input.NumberInput[int, Tuple[int, int]]

An input box for 2 ints.

value: _TInput

The inputted value.

class dearpygui_obj.input.InputInt3(label: Optional[str] = None, value: Optional[dearpygui_obj.input._TInput] = None, **config)[source]

Bases: dearpygui_obj.input.NumberInput[int, Tuple[int, int, int]]

An input box for 3 ints.

value: _TInput

The inputted value.

class dearpygui_obj.input.InputInt4(label: Optional[str] = None, value: Optional[dearpygui_obj.input._TInput] = None, **config)[source]

Bases: dearpygui_obj.input.NumberInput[int, Tuple[int, int, int, int]]

An input box for 4 ints.

value: _TInput

The inputted value.

Sliders

Summary

SliderFloat

A slider for a float value.

SliderFloat2

A slider for 2 float values.

SliderFloat3

A slider for 3 float values.

SliderFloat4

A slider for 4 float values.

SliderInt

A slider for an integer value.

SliderInt2

A slider for 2 integer values.

SliderInt3

A slider for 3 integer values.

SliderInt4

A slider for 4 integer values.

class dearpygui_obj.input.SliderInput(label: Optional[str] = None, value: Optional[dearpygui_obj.input._TElem] = None, **config)[source]

Bases: Generic[dearpygui_obj.input._TElem, dearpygui_obj.input._TInput], dearpygui_obj.wrapper.widget.Widget, dearpygui_obj.wrapper.widget.ItemWidgetMx, dearpygui_obj.wrapper.widget.ValueWidgetMx[dearpygui_obj.input._TInput]

Base class for slider types.

value: _TInput

The inputted value.

label: str

Read or modify the ‘label’ config property.

min_value: _TElem

Read or modify the ‘min_value’ config property.

max_value: _TElem

Read or modify the ‘max_value’ config property.

format: str

number format

vertical: bool

Read or modify the ‘vertical’ config property.

no_input: bool

Control whether a value can be manually entered using CTRL+Click

clamped: bool

Whether to clamp the value when using manual input. By default CTRL+Click allows going out of bounds.

Float Sliders

class dearpygui_obj.input.SliderFloat(label: Optional[str] = None, value: Optional[dearpygui_obj.input._TElem] = None, **config)[source]

Bases: dearpygui_obj.input.SliderInput[float, float]

A slider for a float value.

If not disabled using the no_input property, the slider can be CTRL+Clicked to turn it into an input box for manual input of a value.

value: _TInput

The inputted value.

class dearpygui_obj.input.SliderFloat2(label: Optional[str] = None, value: Optional[dearpygui_obj.input._TElem] = None, **config)[source]

Bases: dearpygui_obj.input.SliderInput[float, Tuple[float, float]]

A slider for 2 float values.

If not disabled using the no_input property, the slider can be CTRL+Clicked to turn it into an input box for manual input of a value.

value: _TInput

The inputted value.

class dearpygui_obj.input.SliderFloat3(label: Optional[str] = None, value: Optional[dearpygui_obj.input._TElem] = None, **config)[source]

Bases: dearpygui_obj.input.SliderInput[float, Tuple[float, float, float]]

A slider for 3 float values.

If not disabled using the no_input property, the slider can be CTRL+Clicked to turn it into an input box for manual input of a value.

value: _TInput

The inputted value.

class dearpygui_obj.input.SliderFloat4(label: Optional[str] = None, value: Optional[dearpygui_obj.input._TElem] = None, **config)[source]

Bases: dearpygui_obj.input.SliderInput[float, Tuple[float, float, float, float]]

A slider for 4 float values.

If not disabled using the no_input property, the slider can be CTRL+Clicked to turn it into an input box for manual input of a value.

value: _TInput

The inputted value.

Integer Sliders

class dearpygui_obj.input.SliderInt(label: Optional[str] = None, value: Optional[dearpygui_obj.input._TElem] = None, **config)[source]

Bases: dearpygui_obj.input.SliderInput[int, int]

A slider for an integer value.

If not disabled using the no_input property, the slider can be CTRL+Clicked to turn it into an input box for manual input of a value.

value: _TInput

The inputted value.

class dearpygui_obj.input.SliderInt2(label: Optional[str] = None, value: Optional[dearpygui_obj.input._TElem] = None, **config)[source]

Bases: dearpygui_obj.input.SliderInput[int, Tuple[int, int]]

A slider for 2 integer values.

If not disabled using the no_input property, the slider can be CTRL+Clicked to turn it into an input box for manual input of a value.

value: _TInput

The inputted value.

class dearpygui_obj.input.SliderInt3(label: Optional[str] = None, value: Optional[dearpygui_obj.input._TElem] = None, **config)[source]

Bases: dearpygui_obj.input.SliderInput[int, Tuple[int, int, int]]

A slider for 3 integer values.

If not disabled using the no_input property, the slider can be CTRL+Clicked to turn it into an input box for manual input of a value.

value: _TInput

The inputted value.

class dearpygui_obj.input.SliderInt4(label: Optional[str] = None, value: Optional[dearpygui_obj.input._TElem] = None, **config)[source]

Bases: dearpygui_obj.input.SliderInput[int, Tuple[int, int, int, int]]

A slider for 4 integer values.

If not disabled using the no_input property, the slider can be CTRL+Clicked to turn it into an input box for manual input of a value.

value: _TInput

The inputted value.

Drag Inputs

Summary

DragFloat

A drag input for a float value.

DragFloat2

A drag input for 2 float values.

DragFloat3

A drag input for 3 float values.

DragFloat4

A drag input for 4 float values.

DragInt

A drag input for an integer value.

DragInt2

A drag input for 2 integer values.

DragInt3

A drag input for 3 integer values.

DragInt4

A drag input for 4 integer values.

class dearpygui_obj.input.DragInput(label: Optional[str] = None, value: Optional[dearpygui_obj.input._TElem] = None, **config)[source]

Bases: Generic[dearpygui_obj.input._TElem, dearpygui_obj.input._TInput], dearpygui_obj.wrapper.widget.Widget, dearpygui_obj.wrapper.widget.ItemWidgetMx, dearpygui_obj.wrapper.widget.ValueWidgetMx[dearpygui_obj.input._TInput]

Base class for drag input boxes.

value: _TInput

The inputted value.

label: str

Read or modify the ‘label’ config property.

min_value: _TElem

Read or modify the ‘min_value’ config property.

max_value: _TElem

Read or modify the ‘max_value’ config property.

format: str

number format

no_input: bool

Control whether a value can be manually entered using CTRL+Click

clamped: bool

Whether to clamp the value when using manual input. By default CTRL+Click allows going out of bounds.

Float Drag Input

class dearpygui_obj.input.DragFloat(label: Optional[str] = None, value: Optional[dearpygui_obj.input._TElem] = None, **config)[source]

Bases: dearpygui_obj.input.DragInput[float, float]

A drag input for a float value.

If not disabled using the no_input property, the drag input can be CTRL+Clicked to turn it into an input box for manual input of a value.

value: _TInput

The inputted value.

class dearpygui_obj.input.DragFloat2(label: Optional[str] = None, value: Optional[dearpygui_obj.input._TElem] = None, **config)[source]

Bases: dearpygui_obj.input.DragInput[float, Tuple[float, float]]

A drag input for 2 float values.

If not disabled using the no_input property, the drag input can be CTRL+Clicked to turn it into an input box for manual input of a value.

value: _TInput

The inputted value.

class dearpygui_obj.input.DragFloat3(label: Optional[str] = None, value: Optional[dearpygui_obj.input._TElem] = None, **config)[source]

Bases: dearpygui_obj.input.DragInput[float, Tuple[float, float, float]]

A drag input for 3 float values.

If not disabled using the no_input property, the drag input can be CTRL+Clicked to turn it into an input box for manual input of a value.

value: _TInput

The inputted value.

class dearpygui_obj.input.DragFloat4(label: Optional[str] = None, value: Optional[dearpygui_obj.input._TElem] = None, **config)[source]

Bases: dearpygui_obj.input.DragInput[float, Tuple[float, float, float, float]]

A drag input for 4 float values.

If not disabled using the no_input property, the drag input can be CTRL+Clicked to turn it into an input box for manual input of a value.

value: _TInput

The inputted value.

Integer Drag Input

class dearpygui_obj.input.DragInt(label: Optional[str] = None, value: Optional[dearpygui_obj.input._TElem] = None, **config)[source]

Bases: dearpygui_obj.input.DragInput[int, int]

A drag input for an integer value.

If not disabled using the no_input property, the drag input can be CTRL+Clicked to turn it into an input box for manual input of a value.

value: _TInput

The inputted value.

class dearpygui_obj.input.DragInt2(label: Optional[str] = None, value: Optional[dearpygui_obj.input._TElem] = None, **config)[source]

Bases: dearpygui_obj.input.DragInput[int, Tuple[int, int]]

A drag input for 2 integer values.

If not disabled using the no_input property, the drag input can be CTRL+Clicked to turn it into an input box for manual input of a value.

value: _TInput

The inputted value.

class dearpygui_obj.input.DragInt3(label: Optional[str] = None, value: Optional[dearpygui_obj.input._TElem] = None, **config)[source]

Bases: dearpygui_obj.input.DragInput[int, Tuple[int, int, int]]

A drag input for 3 integer values.

If not disabled using the no_input property, the drag input can be CTRL+Clicked to turn it into an input box for manual input of a value.

value: _TInput

The inputted value.

class dearpygui_obj.input.DragInt4(label: Optional[str] = None, value: Optional[dearpygui_obj.input._TElem] = None, **config)[source]

Bases: dearpygui_obj.input.DragInput[int, Tuple[int, int, int, int]]

A drag input for 4 integer values.

If not disabled using the no_input property, the drag input can be CTRL+Clicked to turn it into an input box for manual input of a value.

value: _TInput

The inputted value.

Color Input

Summary

ColorPicker

A color picking widget.

ColorEdit

A color editing widget.

ColorButton

A button that displays and enables copying of color data.

ColorEdit

A color editing widget.

ColorPicker

A color picking widget.

class dearpygui_obj.input.ColorButton(color: dearpygui_obj.data.ColorRGBA = ColorRGBA(r=1, g=0, b=1, a=255), **config)[source]

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

A button that displays and enables copying of color data.

Clicking and draging the color square will copy the color to be applied on any other color widget.

While it has color “value”, this is not a ValueWidgetMx!

color: ColorRGBA

The color to copy on drag-and-drop.

no_border: bool

Read or modify the ‘no_border’ config property.

no_alpha: bool

Don’t include alpha channel.

no_drag_drop: bool

Read or modify the ‘no_drag_drop’ config property.

class dearpygui_obj.input.ColorPicker(label: Optional[str] = None, value: dearpygui_obj.data.ColorRGBA = ColorRGBA(r=1, g=0, b=1, a=255), **config)[source]

Bases: dearpygui_obj.wrapper.widget.Widget, dearpygui_obj.wrapper.widget.ItemWidgetMx, dearpygui_obj.wrapper.widget.ValueWidgetMx[dearpygui_obj.data.ColorRGBA]

A color picking widget.

Clicking and draging the color square will copy the color to be applied on any other color widget. Right-click allows the style of the color picker to be changed.

value: ColorRGBA

The picked color.

label: str

Read or modify the ‘label’ config property.

no_alpha: bool

Read or modify the ‘no_alpha’ config property.

no_small_preview: bool

Read or modify the ‘no_small_preview’ config property.

no_inputs: bool

Read or modify the ‘no_inputs’ config property.

no_tooltip: bool

Read or modify the ‘no_tooltip’ config property.

no_label: bool

Read or modify the ‘no_label’ config property.

no_side_preview: bool

Read or modify the ‘no_side_preview’ config property.

alpha_bar: bool

Read or modify the ‘alpha_bar’ config property.

alpha_preview: bool

Read or modify the ‘alpha_preview’ config property.

alpha_preview_half: bool

Read or modify the ‘alpha_preview_half’ config property.

display_rgb: bool

Read or modify the ‘display_rgb’ config property.

display_hsv: bool

Read or modify the ‘display_hsv’ config property.

display_hex: bool

Read or modify the ‘display_hex’ config property.

picker_hue_bar: bool

Read or modify the ‘picker_hue_bar’ config property.

picker_hue_wheel: bool

Read or modify the ‘picker_hue_wheel’ config property.

input_rgb: bool

Read or modify the ‘input_rgb’ config property.

input_hsv: bool

Read or modify the ‘input_hsv’ config property.

color_format: ColorFormatMode

Read or modify the ‘color_format’ config property.

class dearpygui_obj.input.ColorEdit(label: Optional[str] = None, value: dearpygui_obj.data.ColorRGBA = ColorRGBA(r=1, g=0, b=1, a=255), **config)[source]

Bases: dearpygui_obj.wrapper.widget.Widget, dearpygui_obj.wrapper.widget.ItemWidgetMx, dearpygui_obj.wrapper.widget.ValueWidgetMx[dearpygui_obj.data.ColorRGBA]

A color editing widget.

Clicking and draging the color square will copy the color to be applied on any other color widget.

value: ColorRGBA

The inputted color.

label: str

Read or modify the ‘label’ config property.

no_alpha: bool

Don’t include alpha channel.

no_picker: bool

Read or modify the ‘no_picker’ config property.

no_options: bool

Read or modify the ‘no_options’ config property.

no_small_preview: bool

Read or modify the ‘no_small_preview’ config property.

no_inputs: bool

Read or modify the ‘no_inputs’ config property.

no_tooltip: bool

Read or modify the ‘no_tooltip’ config property.

no_label: bool

Read or modify the ‘no_label’ config property.

no_drag_drop: bool

Read or modify the ‘no_drag_drop’ config property.

alpha_bar: bool

Read or modify the ‘alpha_bar’ config property.

alpha_preview: bool

Read or modify the ‘alpha_preview’ config property.

alpha_preview_half: bool

Read or modify the ‘alpha_preview_half’ config property.

display_rgb: bool

Read or modify the ‘display_rgb’ config property.

display_hsv: bool

Read or modify the ‘display_hsv’ config property.

display_hex: bool

Read or modify the ‘display_hex’ config property.

input_rgb: bool

Read or modify the ‘input_rgb’ config property.

input_hsv: bool

Read or modify the ‘input_hsv’ config property.

color_format: ColorFormatMode

Read or modify the ‘color_format’ config property.

class dearpygui_obj.input.ColorFormatMode(value)[source]

Bases: enum.Enum

Specifies how color element values are formatted.

UInt8 = 0

Format as 0-255

Float = 1

Format as 0.0-1.0

Date and Time Input

Summary

DatePicker

A date picker widget. .. warning::.

DatePickerMode

The picking mode shown in a DatePicker.

TimePicker

A time picker widget. .. warning::.

TimePickerFormat

The time format used by TimePicker.

class dearpygui_obj.input.DatePicker(**config)[source]

Bases: dearpygui_obj.wrapper.widget.Widget, dearpygui_obj.wrapper.widget.ItemWidgetMx, dearpygui_obj.wrapper.widget.ValueWidgetMx[datetime.date]

A date picker widget. .. warning:

Setting the :attr:`value` property currently does not work. This is an issue with DPG 0.6.
Attempting to do so will raise a :class:`.NotImplementedError`.
mode: DatePickerMode

The current picking mode.

class dearpygui_obj.input.DatePickerMode(value)[source]

Bases: enum.Enum

The picking mode shown in a DatePicker.

Day = 0
Month = 1
Year = 2
class dearpygui_obj.input.TimePicker(**config)[source]

Bases: dearpygui_obj.wrapper.widget.Widget, dearpygui_obj.wrapper.widget.ValueWidgetMx[datetime.time]

A time picker widget. .. warning:

Setting the :attr:`value` property currently does not work. This is an issue with DPG 0.6.
Attempting to do so will raise a :class:`.NotImplementedError`.
format: TimePickerFormat
mode

The current picking mode.

class dearpygui_obj.input.TimePickerFormat(value)[source]

Bases: enum.Enum

The time format used by TimePicker.

Hour12 = False
Hour24 = True