FieldOptions
Bases: TypedDict
Type hints for Field widget configuration options.
Attributes:
| Name | Type | Description |
|---|---|---|
allow_blank |
bool
|
If True, empty input is allowed. If False, empty input preserves previous value. |
accent |
str
|
Accent token for the focus ring and active border of the input. |
density |
Literal['default', 'compact']
|
Widget density. 'default' for normal size, 'compact' for smaller size. |
variant |
str
|
Style variant (if applicable). |
cursor |
str
|
Cursor to display when hovering over the widget. |
value_format |
str
|
ICU format pattern for parsing/formatting (e.g., '$#,##0.00' for currency). |
exportselection |
bool
|
If True, selected text is exported to X selection. |
font |
str
|
Font to use for text display. |
foreground |
str
|
Text color. |
initial_focus |
bool
|
If True, widget receives focus when created. |
justify |
str
|
Text justification ('left', 'center', 'right'). |
show_message |
bool
|
If True, displays message text below the field. |
padding |
str
|
Padding around the entry widget. |
show |
str
|
Character to display instead of typed characters (for password fields). |
state |
Literal['normal', 'disabled', 'readonly']
|
The widget state. One of 'normal', 'disabled', or 'readonly'. |
takefocus |
bool
|
If True, widget can receive focus via Tab key. |
textvariable |
Variable
|
Tkinter Variable to link with the entry text. |
textsignal |
Signal
|
Signal object for reactive text updates. |
width |
int
|
Width of the entry in characters. |
required |
bool
|
If True, field cannot be empty (adds validation rule). |
xscrollcommand |
Callable[[int, int], None]
|
Callback for horizontal scrolling. |
localize |
bool | Literal['auto']
|
Determines the field label localization mode. 'auto', True, False. |