File: multiline_textbox.py

package info (click to toggle)
python-guizero 0.6.0%2Bdfsg1-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 1,820 kB
  • sloc: python: 5,376; makefile: 28; sh: 17
file content (11 lines) | stat: -rw-r--r-- 563 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
from guizero import App, TextBox, PushButton, Text

def show():
    output.value = textbox.value

app = App()
textbox = TextBox(app, multiline=True, height=10, width=50, scrollbar=True)
textbox.value = "hello\ngoodbye\nno way\nthis is a very long stream of text, very long indeed, the best long line of text, its super bigly and very long, I dont think it could possibly be any better particularly as it was created by someone who is super good at creating long lines of text."
button = PushButton(app, text="Print", command=show)
output = Text(app)
app.display()