Exemple #1
0
 def get_ui_text(self, param, desc, help=''):
     v = getattr(self, param)
     return UI.LayoutTableRow(
         UI.Label(text=desc),
         UI.Select(UI.SelectOption(text='Ignore',
                                   value='ign',
                                   selected=v[1] is None),
                   UI.SelectOption(text='Is',
                                   value='nrm',
                                   selected=not v[0] and v[1] is not None),
                   UI.SelectOption(text='Isn\'t',
                                   value='inv',
                                   selected=v[0] and v[1] is not None),
                   name='%s-mode' % param),
         UI.TextInput(name=param, value=v[1] or '', help=help))
Exemple #2
0
 def get_ui_text(self, param, help=''):
     v = getattr(self, param)
     return UI.HContainer(UI.SelectInput(
         UI.SelectOption(text='Ign.', value='ign', selected=v[1] is None),
         UI.SelectOption(text='Is',
                         value='nrm',
                         selected=not v[0] and v[1] is not None),
         UI.SelectOption(text='Isn\'t',
                         value='inv',
                         selected=v[0] and v[1] is not None),
         design='mini',
         name='%s-mode' % param),
                          UI.TextInput(name=param,
                                       value=v[1] or '',
                                       help=help),
                          spacing=5)