Created
June 13, 2018 15:36
-
-
Save martinohanlon/748f46b72b8dc1ea922c91e95d1a6da8 to your computer and use it in GitHub Desktop.
guizero character counting example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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