Skip to content

Commit

Permalink
Add pybind to get Widget from ItemId
Browse files Browse the repository at this point in the history
  • Loading branch information
errissa committed Oct 13, 2023
1 parent be9de8b commit cdbc3e5
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions cpp/pybind/visualization/gui/gui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1550,6 +1550,11 @@ void pybind_gui_classes(py::module &m) {
.def("remove_item", &TreeView::RemoveItem,
"Removes an item and all its children (if any)")
.def("clear", &TreeView::Clear, "Removes all items")
.def("get_item", &TreeView::GetItem,
"Returns the widget associated with the provided Item ID. For "
"example, to manipulate the widget of the currently selected "
"item you would use the ItemID of the selected_item property "
"with get_item to get the widget.")
.def_property(
"can_select_items_with_children",
&TreeView::GetCanSelectItemsWithChildren,
Expand Down

0 comments on commit cdbc3e5

Please sign in to comment.