how to hide radio buttons?

25 views
Skip to first unread message

Patrick Shin

unread,
Jul 12, 2014, 6:53:42 PM7/12/14
to gui...@googlegroups.com
Hi all,

I was just wondering how to hide radio buttons in gui2py
so lets say for instance in sample.py if you clicked option 3 then option 2 would disappear or become disabled.
I'm relatively new to python so please excuse my naivety.
Thank you in advance!

Mariano Reingart

unread,
Jul 12, 2014, 8:55:44 PM7/12/14
to Patrick Shin, gui2py
You can disable any control with the enabled property:

mywin['notebook']['tab0']['panel']['opt1'].enabled = False

To hide it, use the visible property:

mywin['notebook']['tab0']['panel']['opt1'].visible = False

To hide it when option 3 is clicked:

def option_clicked(evt):
mywin['notebook']['tab0']['panel']['opt1'].visible = False

mywin['notebook']['tab0']['panel']['opt3'].onclick = option_clicked

Hope it helps,

Best regards

Mariano Reingart
http://www.sistemasagiles.com.ar
http://reingart.blogspot.com
Reply all
Reply to author
Forward
0 new messages