Skip to content

Instantly share code, notes, and snippets.

Created August 20, 2010 16:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/540681 to your computer and use it in GitHub Desktop.
Save anonymous/540681 to your computer and use it in GitHub Desktop.
--- 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