tkinter, overwrite Label-text?
Dennis.Benzinger@gmx.net
dennis.benzinger at gmx.net
Thu Apr 10 10:56:57 EDT 2008
On Apr 10, 4:37 pm, skanem... at yahoo.se wrote:
> [...]
> i know how to do this already. the problem is i want the text to stay
> in the windowa nd not start overwriting "Answer:".
> i have solved this by using an Entry for the answer as well but id
> prefer using a Label.
> [...]
You can set the width option of the Label. For example:
b = Label(mygui, text=eval(expr), width=20)
Then the Label will always be 20 characters wide no matter how long
the answer is.
You can read more about the options for Tk widgets in <http://
www.tcl.tk/man/tcl8.5/TkCmd/contents.htm>.
Dennis Benzinger
More information about the Python-list
mailing list