]>
vault307.fbx.one Git - mu_code.git/blob - tkScrolledText101.py
2 import tkinter
.scrolledtext
as tkst
5 root
.title("ScrolledText")
6 frame
=tk
.Frame(root
,bg
='brown')
7 frame
.pack(fill
='both',expand
='yes')
9 edit_space
=tkst
.ScrolledText(
11 wrap
='word', # wrap text at full words only
12 width
=25, # characters
13 height
=10, # text lines
14 bg
='beige', # background color of edit area
16 # the padx/pady space will form a frame
17 edit_space
.pack(fill
='both',expand
=True,padx
=8,pady
=8)
20 Man who drive like hell, bound to get there.
22 Man who run in front of tire, get tired.
24 Man who run behind car, get exhausted.
26 The Internet: where men are men, women are men, and children are FBI agents.
29 edit_space
.insert('insert',mytext
)