Text properties: expand and fill : Text « GUI Tk « Python






Text properties: expand and fill

Text properties: expand and fill
 
from Tkinter import *
root = Tk()
def hello(event): print 'Got tag event'

text = Text()
text.config(font=('courier', 15, 'normal'))
text.config(width=20, height=12)
text.pack(expand=YES, fill=BOTH)
text.insert(END, 'Lin 1\n\nLin 2\n\nLin 3.\n\n')  

root.mainloop()


           
         
  








Related examples in the same category

1.Draw textDraw text
2.Draw text with fontDraw text with font
3.Scrolled TextScrolled Text
4.Change color for tagsChange color for tags
5.Change font for TextChange font for Text
6.Add double click action to a TextAdd double click action to a Text
7.Insert String to a TextInsert String to a Text
8.Text with ScrollBarText with ScrollBar
9.Show a file in a text widget
10.Search string in TextSearch string in Text