def test_remove(): a = App() c = Combo(a, ["foo", "bar", "foo"]) assert c.options == ["foo", "bar", "foo"] c.remove("foo") assert c.options == ["bar", "foo"] a.destroy()
from guizero import App, Combo def selected(value): print(value) app = App() combo = Combo(app, ["Nothing", "Something", "Everything"], command=selected, selected="Something") combo.remove("Something") combo2 = Combo(app) combo2.append("hi") combo2.append("bye") app.display()