[Tutor] Entry widgets

Diana Hawksworth dianahawks at optusnet.com.au
Mon Apr 11 08:50:02 CEST 2005


Thanks Michael. Your suggestions did the trick!  I did mean to include my
code - but obviously did not do that. Appreciate your help. Diana

----- Original Message ----- 
From: "Michael Lange" <klappnase at freenet.de>
To: <tutor at python.org>
Sent: Monday, April 11, 2005 1:49 AM
Subject: Re: [Tutor] Entry widgets


> 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)
> or
>     e.configure(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)
>     e.focus_set()
>
> > TIA. Diana
>
> I hope this helps
>
> Michael
>
> _______________________________________________
> Tutor maillist  -  Tutor at python.org
> http://mail.python.org/mailman/listinfo/tutor




More information about the Tutor mailing list