[Tutor] Entry widgets
klappnase at freenet.de
Sun Apr 10 17:49:39 CEST 2005
On Sun, 10 Apr 2005 18:07:48 +1000
"Diana Hawksworth" <dianahawks at optusnet.com.au> wrote:
> Hello list,
> Is it possible to change the width of an Entry widget - or not? I am using Tkinter, GUI - and have an Entry widget that accepts a number. I just don't want it to extend the width of the column. I have tried width = - but get an error.
You should be able to use the width option as for any other widget:
e = Entry(parent, width=5)
What exactly did you write, and what was the error?
> Maybe a text widget would be preferable?
If you just want one line to enter a number, I don't think so.
> Also - how do I set the insertion symbol there already, so I don't need to click there to enter the number?
You can use focus_set():
e = Entry(parent)
> TIA. Diana
I hope this helps
More information about the Tutor