Created
August 20, 2010 16:47
-
-
Save anonymous/540681 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- pyvcp_widgets.py_orig 2010-08-20 18:19:32.814103584 +0200 | |
+++ pyvcp_widgets.py 2010-08-20 18:20:02.546094574 +0200 | |
@@ -566,7 +566,7 @@ | |
class pyvcp_radiobutton(Frame): | |
n=0 | |
- def __init__(self,master,pycomp,halpin=None,choices=[],**kw): | |
+ def __init__(self,master,pycomp,halpin=None,initval=0,choices=[],**kw): | |
f=Frame.__init__(self,master,bd=2,relief=GROOVE) | |
self.v = IntVar() | |
self.v.set(1) | |
@@ -581,7 +581,7 @@ | |
b=Radiobutton(self,f, text=str(c) | |
,variable=self.v, value=pow(2,n)) | |
b.pack() | |
- if n==0: | |
+ if n==initval: | |
b.select() | |
c_halpin=halpin+"."+str(c) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment