[Tkinter-discuss] python: Display the text on tk window.
Michael Lange
klappnase at web.de
Fri Jul 19 11:33:16 CEST 2013
On Fri, 19 Jul 2013 14:42:46 +0530
Srinivas Rao <srinivas.rambha at gmail.com> wrote:
> I tried to write my code using label widget, but the options are
> different comparing to text widget.
> I tried but couldn't succeed.
> for example: It wraps the text to WORD or CHAR by itself in text
> widget. But in label, The default value is 0, means that lines will be
> broken only at newlines. so please help me to convert my code from TEXT
> to LABEL. If possible please show me how to write my code using LABEL
> widget. thank you
> with regards,
> srinivas
The Label widget has a wraplength option, which determines the maximum
length of a line before it is being wrapped.
If you want to learn more about widget options you might want to have a
look at John Shipman's excellent and up to date Tkinter reference:
http://infohost.nmt.edu/tcc/help/pubs/tkinter/web/index.html
There is also Frederick Lundh's Tkinter book (still work in progress but
nevertheles an invaluable source):
http://effbot.org/tkinterbook/tkinter-index.htm
Regards
Michael
.-.. .. ...- . .-.. --- -. --. .- -. -.. .--. .-. --- ... .--. . .-.
... bacteriological warfare ... hard to believe we were once foolish
enough to play around with that.
-- McCoy, "The Omega Glory", stardate unknown
More information about the Tkinter-discuss
mailing list