From d24ee089b82082f9318f0578745255c2249ebbf3 Mon Sep 17 00:00:00 2001 From: Al Smart Date: Mon, 2 May 2016 11:14:12 -0400 Subject: [PATCH] pyvcp_widgets.py Signed-off-by: Al Smart --- lib/python/pyvcp_widgets.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/python/pyvcp_widgets.py b/lib/python/pyvcp_widgets.py index a9d5b1f..50c9b9d 100644 --- a/lib/python/pyvcp_widgets.py +++ b/lib/python/pyvcp_widgets.py @@ -586,17 +586,21 @@ class pyvcp_jogwheel(Canvas): ["one","two","three"] labels next to each button "radio" pin giving index of active button 0 index of button pin to set true at start + HORIZONTAL add horizontal tag default is vertical """ ################################################################################ class pyvcp_radiobutton(Frame): n=0 - def __init__(self,master,pycomp,halpin=None,initval=0,choices=[],**kw): + def __init__(self,master,pycomp,halpin=None,initval=0,orient=0,choices=[],**kw): f=Frame.__init__(self,master,bd=2,relief=GROOVE) self.v = IntVar() self.v.set(1) self.choices=choices + self.side = 'top' + if orient > 0: + self.side = 'left' if halpin == None: halpin = "radiobutton."+str(pyvcp_radiobutton.n) pyvcp_radiobutton.n += 1 @@ -605,7 +609,7 @@ class pyvcp_radiobutton(Frame): n=0 for c in choices: b=Radiobutton(self,f, text=str(c),variable=self.v, value=pow(2,n)) - b.pack() + b.pack(side=self.side) if n==initval: b.select() c_halpin=halpin+"."+str(c) -- 1.7.9.5