Skip to content

Instantly share code, notes, and snippets.

@martinohanlon
Created June 13, 2018 15:36
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save martinohanlon/748f46b72b8dc1ea922c91e95d1a6da8 to your computer and use it in GitHub Desktop.
Save martinohanlon/748f46b72b8dc1ea922c91e95d1a6da8 to your computer and use it in GitHub Desktop.
guizero character counting example
from guizero import App, TextBox, Text
def count():
result.value = len(text_to_count.value) - 1
app = App(title="character count")
instruction = Text(app, text="Put your text here")
text_to_count = TextBox(app, multiline = True, width=60, height=25, command=count)
text_to_count.when_key_released = count
result = Text(app, text="0")
app.display()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment