spino.gui_toolkit.widget.MyEntry module

class spino.gui_toolkit.widget.MyEntry.MyEntry(parent, row, column, text, label_text=None, color='#AAAAAA', columnspan=2, entry_width=10, **kwargs)[source]

Bases: Frame

A custom entry widget that wraps tkinter’s Entry in a Frame.

This class creates a text entry field with customizable appearance and behavior, inheriting from Frame to provide better grid layout management and consistent styling. It can optionally include a label.

Variables:

entry (Entry) – The underlying tkinter Entry widget

Parameters:
__init__(parent, row, column, text, label_text=None, color='#AAAAAA', columnspan=2, entry_width=10, **kwargs)[source]

Initialize the MyEntry widget.

Parameters:
  • parent (Any) – The parent widget

  • row (int) – Row position in the parent’s grid

  • column (int) – Column position in the parent’s grid

  • text (str) – Initial text to display in the entry field

  • label_text (Optional[str]) – Optional text to display as a label before the entry field

  • color (str) – Background color of the containing frame

  • columnspan (int) – Number of columns the widget should span

  • entry_width (int) – Width of the entry field in characters

  • **kwargs (Dict[str, Any]) – Additional keyword arguments passed to the Entry widget

Return type:

None

get_value()[source]

Get the current value from the entry field.

Returns:

The current text in the entry field

Return type:

str

set_value(value)[source]

Set the value of the entry field.

Parameters:

value (str) – The text to set in the entry field

Return type:

None

set_status(status)[source]

Enable or disable the entry field.

Parameters:

status – The state to set the entry field to (‘normal’, ‘disabled’, etc.)

Return type:

None