DropDown invalid item

As you can see in this simple piece of code. The only thing i’m doing is to add “Teste” in the itens list in my dropdown object.

Then appears…

Why?

image

The drop down is refreshed when items is assigned, not when it’s modified.

You could do:

items = self.models_dropdown.items
items.append('Teste')
self.models_dropdown.items = items

Welcome to the forum, and please create new questions instead of responding to old ones. And please paste your code instead of a screenshot. You can get your code formatted by enclosing it between lines containing ```.

3 Likes