Guest User

Untitled

a guest
Aug 20th, 2010
124
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.70 KB | None | 0 0
  1. --- pyvcp_widgets.py_orig 2010-08-20 18:19:32.814103584 +0200
  2. +++ pyvcp_widgets.py 2010-08-20 18:20:02.546094574 +0200
  3. @@ -566,7 +566,7 @@
  4.  
  5. class pyvcp_radiobutton(Frame):
  6. n=0
  7. - def __init__(self,master,pycomp,halpin=None,choices=[],**kw):
  8. + def __init__(self,master,pycomp,halpin=None,initval=0,choices=[],**kw):
  9. f=Frame.__init__(self,master,bd=2,relief=GROOVE)
  10. self.v = IntVar()
  11. self.v.set(1)
  12. @@ -581,7 +581,7 @@
  13. b=Radiobutton(self,f, text=str(c)
  14. ,variable=self.v, value=pow(2,n))
  15. b.pack()
  16. - if n==0:
  17. + if n==initval:
  18. b.select()
  19.  
  20. c_halpin=halpin+"."+str(c)
Advertisement
Add Comment
Please, Sign In to add comment