blob: a066a495ed2eb3238b069a0d646b81ca543ec583 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
import urwid
class QuestionnaireItem(urwid.WidgetWrap):
def __init__(self):
self.options = []
unsure = urwid.RadioButton(self.options, u"Unsure")
yes = urwid.RadioButton(self.options, u"Yes")
no = urwid.RadioButton(self.options, u"No")
display_widget = urwid.GridFlow([unsure, yes, no], 15, 3, 1, 'left')
urwid.WidgetWrap.__init__(self, display_widget)
def get_state(self):
for o in self.options:
if o.get_state() is True:
return o.get_label()
|