Omniverse UI: How to update contents of combobox?

I am writing an extension and have a combobox ui that I want to update its contents. Any idea how can I access the options and overwrite them? Which methods should I use?

Hi @joanne.j.rizkallah

You can apply something like the following

combo_box = ui.ComboBox(...).model
# clean combo box
for item in combo_box.get_item_children():
# fill combo box
for value in ["a", "b", "c"]:
    combo_box.append_child_item(None, ui.SimpleStringModel(value))
# change selected value

Thank you so much!

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.