def test_add_option(): a = App() c = Combo(a, ["foo", "bar"]) assert c.value == "foo" c.add_option("car") assert c.value == "car" a.destroy()
from guizero import App, Combo def selected(value): print(value) app = App() combo = Combo(app, ["Nothing", "Something"], command=selected) combo.add_option("Everything") combo2 = Combo(app, ["hi", "bye"]) app.display()
lText.value = "0.54" lLabel = Text(app, grid=[2, 8], text="Longitud", align="left") outputText = Text(app, grid=[3, 5], text="Output", align="left") upText = TextBox(app, grid=[5, 7], align="left") upText.value = "800" upLabel = Text(app, grid=[4, 7], text="down", align="left") downText = TextBox(app, grid=[5, 8], align="left") downText.value = "400" downlLabel = Text(app, grid=[4, 8], text="up", align="left") for ii in os.listdir(): if ii.endswith(".mp4"): browserDir.add_option(ii) enfocar = PushButton(app, text="Preview", command=focus, grid=[0, 1], align="left") background = PushButton(app, text="Background Picture", command=takeBackground, grid=[1, 1], align="left") #setButton = PushButton(app, text = "Set Parameters" ,command = setParameters , grid=[5,1], align="left") record = PushButton(app, text="Record Video", command=recordvideo,