spino.gui_toolkit.widget.MyTextField module¶
- class spino.gui_toolkit.widget.MyTextField.MyTextField(parent, row, column, text, label_text=None, color='#AAAAAA', columnspan=2, rowspan=1, height=1, **kwargs)[source]¶
Bases:
FrameA custom text field widget that wraps tkinter’s Text in a Frame.
This class creates a multi-line text input 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:
text_widget (Text) – The underlying tkinter Text widget
- Parameters:
- __init__(parent, row, column, text, label_text=None, color='#AAAAAA', columnspan=2, rowspan=1, height=1, **kwargs)[source]¶
Initialize the MyTextField widget.
- Parameters:
parent (
Any) – The parent widgetrow (
int) – Row position in the parent’s gridcolumn (
int) – Column position in the parent’s gridtext (
str) – Initial text to display in the text fieldlabel_text (
Optional[str]) – Optional text to display as a label before the text fieldcolor (
str) – Background color of the containing framecolumnspan (
int) – Number of columns the widget should spanrowspan (
int) – Number of rows the widget should spanheight (
int) – Height of the text field in lines**kwargs – Additional keyword arguments passed to the Text widget
- Return type:
None