tkinter question

A

Ajay

hi!

in my gui i have a set of radio buttons and some entry widgets.
what i'd like is that unless a particular radio button is selected, i
shouldn't be able to enter information in the entry widget.

how would i do that? make the widget non-editable?

cheers
 
A

Alex Martelli

Ajay said:
hi!

in my gui i have a set of radio buttons and some entry widgets.
what i'd like is that unless a particular radio button is selected, i
shouldn't be able to enter information in the entry widget.

how would i do that? make the widget non-editable?

theEntry.config(state=DISABLED)

Remember that while the entry is disabled you can't alter its text, e.g.
with insert and delete, you need to set state back to NORMAL
(transiently) to modify the text in an Entry widget.


Alex
 
Joined
Sep 21, 2006
Messages
1
Reaction score
0
Thanks for the info

Hi Alex,

I too had similar question and your information provided me relevant guide.
Thanks a lot.

regards.,
Naveen Sriram.

Alex Martelli said:
Ajay <[email protected]> wrote:

> hi!
>
> in my gui i have a set of radio buttons and some entry widgets.
> what i'd like is that unless a particular radio button is selected, i
> shouldn't be able to enter information in the entry widget.
>
> how would i do that? make the widget non-editable?


theEntry.config(state=DISABLED)

Remember that while the entry is disabled you can't alter its text, e.g.
with insert and delete, you need to set state back to NORMAL
(transiently) to modify the text in an Entry widget.


Alex
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,431
Messages
2,571,679
Members
48,796
Latest member
Greg L.

Latest Threads

Top