Hiya G G

In case you're a freak about namespace polution (and that's really a good 
thing), you can generally rest assured that you'll be almost always fine when 
you do a full namespace import of Tkinter module. 

Harlin Seritt


[EMAIL PROTECTED] wrote: Send Tkinter-discuss mailing list submissions to
 tkinter-discuss@python.org

To subscribe or unsubscribe via the World Wide Web, visit
 http://mail.python.org/mailman/listinfo/tkinter-discuss
or, via email, send a message with subject or body 'help' to
 [EMAIL PROTECTED]

You can reach the person managing the list at
 [EMAIL PROTECTED]

When replying, please edit your Subject line so it is more specific
than "Re: Contents of Tkinter-discuss digest..."


Today's Topics:

   1. Radiobutton issue (G G)
   2. Re: Radiobutton issue (Bob Greschke)


----------------------------------------------------------------------

Message: 1
Date: Wed, 6 Dec 2006 06:13:08 -0800 (PST)
From: G G 
Subject: [Tkinter-discuss] Radiobutton issue
To: tkinter-discuss@python.org
Message-ID: <[EMAIL PROTECTED]>
Content-Type: text/plain; charset="iso-8859-1"

Hello,

I was trying to disable Radiobutton widget, with passing 
Tkinter.Radiobutton(...,state='disabled') . also tried
Tkinter.Radiobutton(...,state=Tkinter.DISABLED) and 
Tkinter.Radiobutton(...,state=DISABLED) and  but no success. In first two cases 
there is no error message but radiobutton doesn't get disabled...
In the third case I got Python error saying DISABLED is not defined.

Is there any known issue/problem with disabling Radiobutton widget?

thanks a lot

 
---------------------------------
Everyone is raving about the all-new Yahoo! Mail beta.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 
http://mail.python.org/pipermail/tkinter-discuss/attachments/20061206/abba73f9/attachment-0001.html
 

------------------------------

Message: 2
Date: Wed, 6 Dec 2006 09:29:41 -0700
From: "Bob Greschke" 
Subject: Re: [Tkinter-discuss] Radiobutton issue
To: "G G" , 
Message-ID: <[EMAIL PROTECTED]>
Content-Type: text/plain; format=flowed; charset="iso-8859-1";
 reply-type=original

From: G G
To: tkinter-discuss@python.org
Sent: Wednesday, December 06, 2006 7:13 AM
Subject: [Tkinter-discuss] Radiobutton issue

I was trying to disable Radiobutton widget, with passing
Tkinter.Radiobutton(...,state='disabled') . also tried
Tkinter.Radiobutton(...,state=Tkinter.DISABLED) and 
Tkinter.Radiobutton(...,state=DISABLED) and  but no success. In first two 
cases there is no error message but radiobutton doesn't get disabled...
In the third case I got Python error saying DISABLED is not defined.

Is there any known issue/problem with disabling Radiobutton widget?

thanks a lot

======

It sounds like you may not be importing Tkinter in the "usual" way.

from Tkinter import *

is what I usually use and then things like  state=DISABLED  will work.

from Tkinter import *
Root = Tk()
RadButVar = StringVar()
RadButVar.set("2") <- set to which button should be initially "on" if any
Rb1 = Radiobutton(Root, text = "TestBut1", variable = RadButVar, value = 
"1")
Rb1.pack()
Rb2 = Radiobutton(Root, text = "TestBut2", variable = RadButVar, value = 
"2")
Rb2.pack()
Root.mainloop()

The above works and I can put  state=DISABLED  in either or both of the 
Radiobutton lines and get predictable results.

I can also do things like  Rb2.config(state = DISABLED)  later in the 
program and it works, however, if a radiobutton is selected when you change 
the state to DISABLED it will stay selected until the user selects another 
one of the associated radiobuttons.

Bob




------------------------------

_______________________________________________
Tkinter-discuss mailing list
Tkinter-discuss@python.org
http://mail.python.org/mailman/listinfo/tkinter-discuss


End of Tkinter-discuss Digest, Vol 34, Issue 5
**********************************************


 
---------------------------------
Everyone is raving about the all-new Yahoo! Mail beta.
_______________________________________________
Tkinter-discuss mailing list
Tkinter-discuss@python.org
http://mail.python.org/mailman/listinfo/tkinter-discuss

Reply via email to