How to use the traitsui.api.Label function in traitsui

To help you get started, we’ve selected a few traitsui examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github chrisdembia / yeadon / yeadon / gui.py View on Github external
Item('PJ1extension', label='PJ1 extension'),
            Item('PJ1adduction', label='PJ1 adduction'),
            Item('PK1extension', label='PK1 extension'),
            Item('PK1abduction', label='PK1 abduction'),
            Item('J1J2flexion', label='J1J2 flexion'),
            Item('K1K2flexion', label='K1K2 flexion'),
            label='Lower limbs',
            dock='tab',
            )
    config_group = VGroup(
            Label('Configuration'),
            Group(config_first_group, config_upper_group, config_lower_group,
                layout='tabbed',
                ),
            Item('reset_configuration', show_label=False),
            Label('P: pelvis (red); T: thorax (orange); C: chest-head (yellow)'),
            Label('A1/A2: left upper arm/forearm-hand; B1/B2: right arm'),
            Label('J1/J2: left thigh/shank-foot; K1/K2: right leg'),
            show_border=True,
            )

    inertia_prop = VGroup(
            Label('Mass center (from origin of coord. sys.) (m):'),
            HGroup(
                Item('x', style='readonly', format_func=format_func),
                Item('y', style='readonly', format_func=format_func),
                Item('z', style='readonly', format_func=format_func)
                ),
            Label('Inertia tensor (about origin, in basis shown) (kg-m^2):'),
            HSplit( # HSplit 2
                Group(
                    Item('Ixx', style='readonly', format_func=format_func),
github NMGRL / pychron / pychron / graph / csv_grapher.py View on Github external
def traits_view(self):
        header = HGroup(Label('X'), Spring(width=60, springy=False),
                        Label('Y'), Spring(width=60, springy=False),
                        Label('Fit'), Spring(width=120, springy=False),
                        Label('Type'), Spring(width=80, springy=False),
                        Label('Filter'),
                        spring,
                        defined_when='not removable'
        )

        v = View(VGroup(header,
                        HGroup(
                            Item('index', editor=EnumEditor(name='column_names')),
                            Item('value', editor=EnumEditor(name='column_names')),
                            Item('fit'),
                            Item('plot_type'),
                            Item('use_filter'),
                            Item('add_button'),
github MatthieuDartiailh / HQCMeas / measurement / task_management / tasks / rf_source_tasks.py View on Github external
def _define_task_view(self):
        """
        """
        line_completer = LineCompleterEditor(
                             entries_updater = self._list_database_entries)
        view = View(
                    VGroup(
                        UItem('task_name', style = 'readonly'),
                        Group(
                            Label('Driver'), Label('Instr'), Label('Power'),
                            Label('Auto start'),
                            UItem('selected_driver',
                                editor = EnumEditor(name = 'driver_list'),
                                width = 100),
                            UItem('selected_profile',
                                editor = EnumEditor(name = 'profile_list'),
                                width = 100),
                            UItem('power', editor = line_completer),
                            UItem('auto_start', tooltip = fill('''Should the
                                source be turned on automatically before
                                the measurement starts ?''', 80)
                                ),
                            columns = 4,
                            show_border = True,
                            ),
                        ),
                     )
github enthought / enable / enable / savage / compliance / sike.py View on Github external
basenames = Bool(True)
    percentages = Bool(True)
    filename = Str()
    line = Int(1)
    code = Str()

    traits_view = tui.View(
        tui.VGroup(
            tui.HGroup(
                tui.Item('basenames'),
                tui.Item('percentages'),
            ),
            tui.HGroup(
                tui.UItem('main_results'),
                tui.VGroup(
                    tui.Label('Callees'),
                    tui.UItem('callee_results'),
                    tui.Label('Callers'),
                    tui.UItem('caller_results'),
                    tui.UItem('filename', style='readonly'),
                    tui.UItem('code', editor=tui.CodeEditor(line='line')),
                ),
                style='custom',
            ),
        ),

        width=1024,
        height=768,
        resizable=True,
        title='Profiling results',
    )
github MatthieuDartiailh / HQCMeas / measurement / task_management / tasks / save_tasks.py View on Github external
),
                    HGroup(
                        HGroup(
                            UItem('filename', editor = line_completer,
                                  springy = True),
                            label = 'Filename',
                            show_border = True,
                            ),
                        HGroup(
                            UItem('fill_header'),
                            label = 'Header',
                            show_border = True,
                            ),
                            ),
                    Group(
                        Label('Mode'),Label('Array to save'),
                        UItem('mode'),
                        UItem('target_array', editor = line_completer),
                        columns = 2,
                        ),
                    show_border = True,
                    ),
                handler = SaveTaskHandler(),
                resizable = True,
                )
        self.trait_view('task_view', view)
github MatthieuDartiailh / HQCMeas / hqc_meas / tasks / lock_in_measure_task.py View on Github external
class LockInMeasureTask(InstrumentTask):
    """Ask a lock-in to perform a measure. Wait for any parallel operation
    before execution.
    """
    selected_mode = Str(preference = True)
    waiting_time = Float(preference = True)

    driver_list = ['SR7265-LI', 'SR7270-LI', 'SR830', 'ZI_HF2LI']

    task_database_entries = {'x' : 1.0}

    task_view = View(
                    VGroup(
                        UItem('task_name', style = 'readonly'),
                        Group(
                            Label('Driver'), Label('Instr'), Label('Mode'),
                            Label('Wait (s)'),
                            UItem('selected_driver',
                                editor = EnumEditor(name = 'driver_list'),
                                width = 100),
                            UItem('selected_profile',
                                editor = EnumEditor(name = 'profile_list'),
                                width = 100),
                            UItem('selected_mode',
                                editor = EnumEditor(values = ['X', 'Y', 'X&Y',
                                                              'Amp', 'Phase',
                                                              'Amp&Phase']),
                                width = 100),
                            UItem('waiting_time',
                                  tooltip = fill('Time to wait before querying\
                                          values from the lock-in', 80),
                                ),
github mne-tools / mne-python / mne / gui / _coreg_gui.py View on Github external
view = View(VGroup(
        VGroup(Item('subject_panel', style='custom'), label="MRI Subject",
               show_border=_SHOW_BORDER, show_labels=False),
        VGroup(Item('lock_fiducials', style='custom',
                    editor=EnumEditor(cols=2, values={False: '2:Edit',
                                                      True: '1:Lock'}),
                    enabled_when='fid_ok'),
               HGroup(Item('hsp_always_visible',
                           label='Show head shape points', show_label=True,
                           enabled_when='not lock_fiducials', width=-1),
                      show_left=False),
               Item('fid_panel', style='custom'), label="MRI Fiducials",
               show_border=_SHOW_BORDER, show_labels=False),
        VGroup(Item('raw_src', style="custom"),
               HGroup('guess_mri_subject',
                      Label('Guess subject from name'), show_labels=False),
               VGrid(Item('grow_hair', editor=laggy_float_editor_mm,
                          width=_MM_WIDTH),
                     Label(u'ΔHair', show_label=True, width=-1), '0',
                     Item('distance', show_label=False, width=_MM_WIDTH,
                          editor=laggy_float_editor_mm),
                     Item('omit_points', width=_BUTTON_WIDTH),
                     Item('reset_omit_points', width=_RESET_WIDTH),
                     columns=3, show_labels=False),
               Item('omitted_info', style='readonly',
                    width=_REDUCED_TEXT_WIDTH), label='Digitization source',
               show_border=_SHOW_BORDER, show_labels=False),
        VGroup(HGroup(Item('headview', style='custom'), Spring(),
                      show_labels=False),
               Item('view_options', width=_REDUCED_TEXT_WIDTH),
               label='View', show_border=_SHOW_BORDER, show_labels=False),
        Spring(),
github enthought / envisage / examples / plugins / tasks / attractors / plot_3d_pane.py View on Github external
#### 'ITaskPane' interface ################################################

    id = "example.attractors.plot_3d_pane"
    name = "Plot 3D Pane"

    #### 'Plot3dPane' interface ###############################################

    active_model = Instance(IModel3d)
    models = List(IModel3d)

    scene = Instance(MlabSceneModel, ())

    view = View(
        HGroup(
            Label("Model: "),
            Item("active_model", editor=EnumEditor(name="_enum_map")),
            show_labels=False,
        ),
        Item(
            "scene",
            editor=SceneEditor(scene_class=MayaviScene),
            show_label=False,
        ),
        resizable=True,
    )

    #### Private traits #######################################################

    _enum_map = Dict(IModel3d, Str)

    ###########################################################################
github MatthieuDartiailh / HQCMeas / measurement / task_management / tasks / rf_source_tasks.py View on Github external
def _define_task_view(self):
        """
        """
        line_completer = LineCompleterEditor(
                             entries_updater = self._list_database_entries)
        view = View(
                    VGroup(
                        UItem('task_name', style = 'readonly'),
                        Group(
                            Label('Driver'), Label('Instr'), Label('Power'),
                            Label('Auto start'),
                            UItem('selected_driver',
                                editor = EnumEditor(name = 'driver_list'),
                                width = 100),
                            UItem('selected_profile',
                                editor = EnumEditor(name = 'profile_list'),
                                width = 100),
                            UItem('power', editor = line_completer),
                            UItem('auto_start', tooltip = fill('''Should the
                                source be turned on automatically before
                                the measurement starts ?''', 80)
                                ),
                            columns = 4,
                            show_border = True,
                            ),
                        ),
github NMGRL / pychron / pychron / processing / series_manager.py View on Github external
def traits_view(self):
        v = View(Item('show', label='Display Peak Center'),
                 HGroup(
                     VGroup(HGroup(Label('Plot Centers')),
                            spring,
                            HGroup(Label('Plot Scans'))
                     ),
                     VGroup(
                         HGroup(Item('plot_centers',
                                     tooltip='Display a time series of peak center values',
                                     show_label=False)),
                         HGroup(
                             Item('plot_scans',
                                  tooltip='Plot peak center scans (DAC vs Intensity)',
                                  show_label=False),
                             Item('overlay',
                                  tooltip='Overlay all scans on one graph',
                                  enabled_when='plot_scans')
                         )
                     ),
                     show_border=True,
                     enabled_when='show'