How to use the guizero.App function in guizero

To help you get started, we’ve selected a few guizero examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github lawsie / guizero / tests / test_text.py View on Github external
def test_destroy():
    a = App()
    t = Text(a)
    destroy_test(t)
    a.destroy()
github lawsie / guizero / tests / test_combo.py View on Github external
def test_display():
    a = App()
    c = Combo(a, ["foo", "bar"])
    display_test(c)
    a.destroy()
github lawsie / guizero / tests / test_text.py View on Github external
def test_text():
    a = App()
    # default values
    t = Text(a, color=None, size=None, font=None)
    text_test(t)
    a.destroy()
github lawsie / guizero / tests / test_buttongroup.py View on Github external
def test_events():
    a = App()
    b = ButtonGroup(a, ["foo", "bar"])
    events_test(b)
    a.destroy()
github lawsie / guizero / tests / test_box.py View on Github external
def test_cascading_properties():
    a = App()
    b = Box(a)
    cascading_properties_test(b)
    a.destroy()
github lawsie / guizero / tests / test_pushbutton.py View on Github external
def test_repeat_schedule():
    a = App()
    b = PushButton(a)
    schedule_repeat_test(a, b)
    a.destroy()
github lawsie / guizero / tests / test_pushbutton.py View on Github external
def test_default_values():
    a = App()
    b = PushButton(a)
    assert b.master == a
    assert b.text == "Button"
    assert b.grid == None
    assert b.align == None
    a.destroy()
github lawsie / guizero / tests / test_picture.py View on Github external
def test_picture_pilobject():
    from PIL import Image

    a = App()
    pil_image = Image.open("../examples/guizero.gif")
    p = Picture(a, image=pil_image)
    assert p.image == pil_image
    assert p._image.tk_image is not None
    assert p._image.pil_image is not None
    a.destroy()
github lawsie / guizero / tests / test_picture.py View on Github external
def test_animated_picture():
    a = App()
    p = Picture(a, image = "../examples/guizero_flash.gif")

    assert p._image.tk_image is not None
    assert p._image.pil_image is not None
    assert p._image.animation
    assert p._image_player.running

    a.destroy()
github lawsie / guizero / examples / demo_converted_from_tk_v2.py View on Github external
# form converted from a tkinter example using column column and row spanning for layout
# http://www.dreamincode.net/forums/topic/371440-tkinter-overview-with-a-fixed-width-grid/

from guizero import App, MenuBar, Text, TextBox, Combo, Slider, CheckBox, ButtonGroup, Box, PushButton, info, yesno

# Draw the form using 'guizero' wrapper for tkinter
app = App("Simple Window", 400, 300, layout="grid")

# Setup the functions needed by the GUI controls
def exit_function():
    print("File option")
    app.destroy()

def edit_function():
    print("Edit option")

def do_salaryScale(slider_value):
    salaryLabel.value = "Salary : "+str(slider_value)

def do_fullTimeCheckBox():
    if fullTimeCheckBox.value == 1:
        app.title=("Simple Window (full-time)")
    else: