How to use the guizero.Window 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_window.py View on Github external
def test_display():
    a = App()
    w = Window(a)
    display_test(w)
    a.destroy()
github lawsie / guizero / tests / test_window.py View on Github external
def test_inheriting_properties():
    a = App()
    w = Window(a)
    inheriting_properties_test(w)
    a.destroy()
github lawsie / guizero / tests / test_window.py View on Github external
def test_after_schedule():
    a = App()
    w = Window(a)
    schedule_after_test(a, w)
    a.destroy()
github lawsie / guizero / tests / test_window.py View on Github external
def test_events():
    a = App()
    w = Window(a)
    events_test(w)
    a.destroy()
github lawsie / guizero / tests / test_window.py View on Github external
def test_cascading_properties():
    a = App()
    w = Window(a)
    cascading_properties_test(w)
    a.destroy()
github lawsie / guizero / tests / test_window.py View on Github external
def test_enable():
    a = App()
    w = Window(a)
    t = Text(w)
    cascading_enable_test(a)
    cascading_enable_test(w)
    a.destroy()
github lawsie / guizero / tests / test_window.py View on Github external
def test_update():
    a = App()
    w = Window(a)
    # just testing it doesnt fail
    w.update()
    a.destroy()
github lawsie / guizero / tests / test_window.py View on Github external
def test_getters_setters():
    a = App()
    w = Window(a)
    w.title = "bar"
    assert w.title == "bar"
    w.bg = "red"
    assert w.bg == "red"
    w.height = 666
    assert w.height == 666
    w.width = 666
    assert w.width == 666
    a.destroy()
github lawsie / guizero / examples / multi_window.py View on Github external
from guizero import App, Window, PushButton, Text

app = App(title="Main window")
Text(app, "Main window")

window = Window(app, title="2nd window", visible=False)
Text(window, "2nd window")

modal_window = Window(app, title="modal window", visible=False)
Text(modal_window, "modal window")

def open_modal():
    modal_window.show(True)

def close_modal():
    modal_window.hide()

open_window_button = PushButton(app, text="Open window", command=window.show)
open_modal_button = PushButton(app, text="Open modal window", command=open_modal)

close_window_button = PushButton(window, text="Close", command=window.hide)
github lawsie / guizero / examples / multi_window.py View on Github external
from guizero import App, Window, PushButton, Text

app = App(title="Main window")
Text(app, "Main window")

window = Window(app, title="2nd window", visible=False)
Text(window, "2nd window")

modal_window = Window(app, title="modal window", visible=False)
Text(modal_window, "modal window")

def open_modal():
    modal_window.show(True)

def close_modal():
    modal_window.hide()

open_window_button = PushButton(app, text="Open window", command=window.show)
open_modal_button = PushButton(app, text="Open modal window", command=open_modal)

close_window_button = PushButton(window, text="Close", command=window.hide)

close_modal_button = PushButton(modal_window, text="Close", command=close_modal)

app.display()