navigate Logo

Getting Started

  • Computer Considerations
  • Computer Power Configuration
  • Software Installation
  • Launching Navigate
  • Configuring Navigate
  • Acquiring Data
  • Smart Acquisition Routines

User Guide

  • Supported Hardware
  • Supported File Formats
  • User Interface Walkthrough
  • Setting Up a Microscope
  • Acquiring Data
  • Case Studies

Development

  • Contributing Guidelines
  • Developer Install
  • Software Architecture
  • Developer Architecture Concepts
  • Feature Container
  • REST API
  • Plugin Architecture
  • Adding New Hardware

Troubleshooting & Known Issues

  • Troubleshooting
  • Known Issues

Plugins

  • navigate Plugin Template
  • navigate Confocal Projection
  • navigate at Scale
  • navigate Constant Velocity Acquisition
  • navigate MMCore
  • navigate ilastik Server
  • navigate Photoactivation

Reference

  • Implemented Microscopes
  • Software API
    • navigate.config
    • navigate.controller
    • navigate.controller.configurator
    • navigate.log_files
    • navigate.model
    • navigate.tools
    • navigate.view
      • navigate.view.configurator_application_window
      • navigate.view.custom_widgets
        • navigate.view.custom_widgets.ArrowLabel
        • navigate.view.custom_widgets.CollapsibleFrame
        • navigate.view.custom_widgets.DockableNotebook
        • navigate.view.custom_widgets.LabelInputWidgetFactory
        • navigate.view.custom_widgets.common
        • navigate.view.custom_widgets.hover
        • navigate.view.custom_widgets.popup
        • navigate.view.custom_widgets.scrollbars
        • navigate.view.custom_widgets.validation
      • navigate.view.main_application_window
      • navigate.view.main_window_content
      • navigate.view.popups
      • navigate.view.splash_screen
      • navigate.view.theme
navigate
  • Software API
  • navigate.view
  • navigate.view.custom_widgets
  • navigate.view.custom_widgets.LabelInputWidgetFactory
  • navigate.view.custom_widgets.LabelInputWidgetFactory.LabelInput
  • View page source

navigate.view.custom_widgets.LabelInputWidgetFactory.LabelInput

class navigate.view.custom_widgets.LabelInputWidgetFactory.LabelInput(parent, label_pos='left', label='', input_class=<class 'tkinter.ttk.Entry'>, input_var=None, input_args=None, label_args=None, **kwargs)

Bases: Frame

Widget class that contains label and input together.

Acknowledgment: Based on the design from “Python GUI Programming: A Complete Reference Guide” by Alan D. Moore and B. M. Harwani.

For reference on widget arguments, visit: https://tkdocs.com/shipman/

To use kwargs for parent arguments, update kwargs like this: kwargs.update(width=900, height=600). Ensure you use super().__init__(parent, **kwargs) to override values correctly.

User Guide: Create instances of LabelInput as children of a LabelFrame for grouped data. Access the widget within LabelInput using self.widget for customization. Example usage:

LabelInput(settings, label_pos="top", label="Exposure Time",
           input_class=ttk.Spinbox, input_var=tk.IntVar(),
           input_args={"from_": 0.5, "to": 100, "increment": 0.1},
           label_args={"height": 2, "width": 4})
__init__(parent, label_pos='left', label='', input_class=<class 'tkinter.ttk.Entry'>, input_var=None, input_args=None, label_args=None, **kwargs)

Initialize LabelInput widget

Parameters:
  • parent (tk widget) – The parent widget of the LabelInput widget

  • label_pos (str, optional) – The position of the label, by default “left”

  • label (str, optional) – The text of the label, by default “”

  • input_class (tk widget, optional) – The type of input widget, by default ttk.Entry

  • input_var (tk variable, optional) – The variable of the input widget, by default None

  • input_args (dict, optional) – The arguments of the input widget, by default None

  • label_args (dict, optional) – The arguments of the label widget, by default None

  • **kwargs (dict) – The arguments of the parent widget, by default None

Methods

__init__(parent[, label_pos, label, ...])

Initialize LabelInput widget

get([default])

Returns the value of the input widget

get_variable()

Returns the variable of the input widget

pad_input(left, up, right, down)

Pad the input widget

set(value, *args, **kwargs)

Sets the value of the input widget

set_values(values)

Set values of a combobox

Attributes

  • variable

  • input_class

  • label

  • widget

get(default=None)

Returns the value of the input widget

Creating a generic get function to catch all types of widgets, this uses the try except block for instances when tkintervariables fails

Parameters:

default (object, optional) – The default value to return if the get value doesn’t work

Returns:

value – The value of the input widget

Return type:

str

Examples

>>> value = self.get()
get_variable()

Returns the variable of the input widget

Returns:

variable – The variable of the input widget

Return type:

tk variable

Examples

>>> variable = self.get_variable()
pad_input(left, up, right, down)

Pad the input widget

This is a function to pad the input widget, it will automatically set the padding of the widget

Parameters:
  • left (int) – left padding

  • up (int) – up padding

  • right (int) – right padding

  • down (int) – down padding

Examples

>>> widget.pad_input(10, 10, 10, 10)
set(value, *args, **kwargs)

Sets the value of the input widget

Parameters:

value (str) – The value to set the input widget to

Examples

>>> self.set(value)
set_values(values)

Set values of a combobox

This is a function to set the values of a combobox, it will automatically set the values and set the first value as the current

Values should be a list of strings or numbers that you want to be options in the specific widget

Parameters:

values (list) – list of values to be set in the widget

input_class

The widget of the input widget

Type:

tk.Widget

label

The label of the input widget

Type:

ttk.Label

variable

The variable of the input widget

Type:

tk.Variable

widget

Specify label position

Previous Next

© Copyright 2026, Dean Lab, UT Southwestern Medical Center.