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.validation
  • navigate.view.custom_widgets.validation.ValidatedSpinbox
  • View page source

navigate.view.custom_widgets.validation.ValidatedSpinbox

class navigate.view.custom_widgets.validation.ValidatedSpinbox(*args, min_var=None, max_var=None, focus_update_var=None, required=True, value_type=<class 'float'>, **kwargs)

Bases: ValidatedMixin, Spinbox

A spinbox that validates input and can be linked to other widgets.

Deletion always allowed, digits always allowed, if from < 0 ‘-’ is allowed as first char, if increment is decimal ‘.’ allowed, if proposed value is greater than to ignore key if proposed value requires more precision than increment, ignore key On focus out, make sure number is a valid number string and greater than from value If given a min_var, max_var, or focus_update_var, then the spinbox range will update dynamically when those valuse are changed (can be used to link to other widgets)

__init__(*args, min_var=None, max_var=None, focus_update_var=None, required=True, value_type=<class 'float'>, **kwargs)

Initialize the spinbox

Parameters:
  • master (tk.Widget) – The parent widget

  • from (int or float) – The minimum value of the spinbox

  • to (int or float) – The maximum value of the spinbox

  • increment (int or float) – The increment of the spinbox

  • min_var (tk.Variable) – A variable that will be used to update the minimum value of the spinbox

  • max_var (tk.Variable) – A variable that will be used to update the maximum value of the spinbox

  • focus_update_var (tk.Variable) – A variable that will be used to update the value of the spinbox when it loses focus

  • no_negative (bool) – If True, the spinbox will not allow negative values

  • no_decimal (bool) – If True, the spinbox will not allow decimal values

  • required (bool) – If True, the spinbox will require a value

  • value_type (type) – Numeric type accepted by the spinbox: int or float.

  • precision (int) – The number of decimal places allowed in the spinbox

Methods

__init__(*args[, min_var, max_var, ...])

Initialize the spinbox

add_history(event)

Add the current value to the history of the widget.

config([cnf])

Configure the spinbox and synchronize validation precision.

configure([cnf])

Configure the spinbox and synchronize validation precision.

redo(event)

Redo the last change that was undone.

set_precision(prec)

Set the precision of the spinbox in decimal places.

trigger_focusout_validation()

Trigger the focusout validation of the widget

undo(event)

Undo the last change to the widget.

Attributes

  • resolution

  • precision

  • variable

  • required

  • value_type

  • min_var

  • max_var

  • focus_update_var

  • error

  • undo_history

  • redo_history

  • hover

add_history(event)

Add the current value to the history of the widget.

Parameters:

event (tk.Event) – The event that triggered the history addition

config(cnf=None, **kwargs)

Configure the spinbox and synchronize validation precision.

The Tk increment option controls the arrow-button step, while this widget’s precision controls which values pass validation. Keep them in sync whenever the increment changes; callers can still use set_precision() afterwards for an intentional override.

configure(cnf=None, **kwargs)

Configure the spinbox and synchronize validation precision.

The Tk increment option controls the arrow-button step, while this widget’s precision controls which values pass validation. Keep them in sync whenever the increment changes; callers can still use set_precision() afterwards for an intentional override.

redo(event)

Redo the last change that was undone.

Parameters:

event (tk.Event) – The event that triggered the redo

set_precision(prec)

Set the precision of the spinbox in decimal places.

Given a precision it will update the spinboxes ability to handle more or less precision for validation. This is separate from the increment value.

Parameters:

prec (int) – The number of decimal places allowed in the spinbox

Examples

>>> spinbox.set_precision(2)
trigger_focusout_validation()

Trigger the focusout validation of the widget

undo(event)

Undo the last change to the widget.

Parameters:

event (tk.Event) – The event that triggered the undo

error

The variable to store the error message in

Type:

tk.StringVar

focus_update_var

The variable to update when the spinbox loses focus

Type:

tk.StringVar

hover

The hover bubble for the widget

Type:

Hover

max_var

The maximum value of the spinbox

Type:

str

min_var

The minimum value of the spinbox

Type:

str

precision

The precision of the spinbox

Type:

int

redo_history

The redo history of the widget

Type:

list

required

Whether the spinbox requires a value

Type:

bool

resolution

The resolution of the spinbox

Type:

Decimal

undo_history

The undo history of the widget

Type:

list

value_type

Numeric type accepted by the spinbox

Type:

type

variable

The variable to store the value of the spinbox in

Type:

tk.StringVar

Previous Next

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