StringColumnDelegate#
- class omni.kit.actions.window.StringColumnDelegate(name: str, get_value_fn: ~typing.Callable[[~omni.kit.actions.window.model.actions_item.AbstractActionItem], str] = None, width: ~omni.ui._ui.Length = 1.000000fr)#
Bases:
AbstractColumnDelegateA simple delegate to display a string in column.
- Kwargs:
get_value_fn (Callable[[ui.AbstractItem], str]): Callback function to get item display string. Default using item.id width (ui.Length): Column width. Default ui.Fraction(1).
Methods
__init__(name[, get_value_fn, width])build_widget(model, item, level, expand)Build a custom column widget in TreeView.
get_value(item)Attributes
- __init__(name: str, get_value_fn: ~typing.Callable[[~omni.kit.actions.window.model.actions_item.AbstractActionItem], str] = None, width: ~omni.ui._ui.Length = 1.000000fr)#
- build_widget(
- model: AbstractActionsModel,
- item: AbstractActionItem,
- level: int,
- expand: bool,
Build a custom column widget in TreeView. Return created widget.
- Parameters:
model (ui.AbstractItemModel) – Actions model.
item (ui.AbstractItem) – Item to show.
level (int) – Level in treeview.
expand (bool) – Iten expand or not.