InputWidget#

class omni.kit.window.popup_dialog.InputWidget(
message: str = None,
input_cls: AbstractField = None,
pre_label: str = None,
post_label: str = None,
default_value: Any = None,
)#

Bases: object

A simple widget with an input field. As opposed to the dialog class, the widget can be combined with other widget types in the same window.

Keyword Arguments:
  • message (str) – Message to display.

  • input_cls (omni.ui.AbstractField) – Class of the input field, e.g. omni.ui.StringField, omni.ui.IntField, omni.ui.CheckBox. Default is omni.ui.StringField.

  • pre_label (str) – Text displayed before input field. Default None.

  • post_label (str) – Text displayed after input field. Default None.

  • default_value (str) – Default value of the input field.

Methods

__init__([message, input_cls, pre_label, ...])

destroy()

Destructor.

get_value()

Returns value of input field.

__init__(
message: str = None,
input_cls: AbstractField = None,
pre_label: str = None,
post_label: str = None,
default_value: Any = None,
)#
destroy()#

Destructor.

get_value() Any#

Returns value of input field.

Returns:

Any