spino.panels.base module

base: shared helpers for the config panels.

  • ScrollFrame: a vertically scrollable container so a tab can hold more rows than fit on screen (extracted from GUIBRUSHR’s ad-hoc Canvas+Scrollbar pattern into a small reusable class).

  • FieldGrid: a thin builder that lays out labelled My* widgets row by row inside a ScrollFrame and keeps references for read-back.

  • numeric-cast helpers used by every panel’s collect().

spino.panels.base.to_int(text, default=None)[source]
Return type:

Optional[int]

Parameters:
  • text (str)

  • default (int | None)

spino.panels.base.to_float(text, default=None)[source]
Return type:

Optional[float]

Parameters:
spino.panels.base.opt_float(text)[source]

Return a float, or None for an empty field.

Return type:

Optional[float]

Parameters:

text (str)

class spino.panels.base.ScrollFrame(parent, bg)[source]

Bases: Frame

A vertically scrollable frame; add widgets to .inner.

Parameters:
  • parent (Any)

  • bg (str)

class spino.panels.base.FieldGrid(parent_tab, bg, title, help_text=None)[source]

Bases: object

Row-by-row builder for labelled input widgets inside a ScrollFrame.

Parameters:
  • parent_tab (Any)

  • bg (str)

  • title (str)

  • help_text (Optional[dict])

section(text)[source]
Return type:

None

Parameters:

text (str)

entry(label, value, width=22)[source]
Return type:

MyEntry

Parameters:
dropdown(label, options, value)[source]
Return type:

MyDropdown

Parameters:
checkbox(label, value)[source]
Return type:

MyCheckBox

Parameters:
path(label, value, mode='dir')[source]

Label + entry + Browse button. mode: ‘dir’ | ‘file’.

Return type:

MyEntry

Parameters:
button(label, colour, command, column=0)[source]
Return type:

MyButton

Parameters:
image(path, max_width=220)[source]

Centered image (e.g. the app logo) below the current rows.

Return type:

Optional[PhotoImage]

Parameters:
next_row()[source]
Return type:

int

property parent