QueryBox
Static methods for displaying query dialogs.
get_color
staticmethod
get_color(
master: Optional[Misc] = None,
title: str = "Color Chooser",
value: Optional[str] = None,
**kwargs: Any,
) -> Any
Show a color picker dialog.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
master
|
Optional[Misc]
|
Parent widget for the dialog. |
None
|
title
|
str
|
The dialog window title. |
'Color Chooser'
|
value
|
Optional[str]
|
Initial color to display. |
None
|
**kwargs
|
Any
|
Additional arguments including 'position'. |
{}
|
Returns:
| Type | Description |
|---|---|
Any
|
Selected color or None if canceled. |
get_date
staticmethod
get_date(
master: Optional[Misc] = None,
title: str = " ",
first_weekday: int = 6,
value: Optional[date] = None,
accent: str = None,
hide_window_chrome: bool = False,
on_result: Optional[Callable[[Any], None]] = None,
**kwargs: Any,
) -> Optional[date]
Show a date picker dialog.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
master
|
Optional[Misc]
|
Parent widget for the dialog. |
None
|
title
|
str
|
The dialog window title. |
' '
|
first_weekday
|
int
|
First day of the week (0=Monday, 6=Sunday). |
6
|
value
|
Optional[date]
|
Initial date to display. |
None
|
accent
|
str
|
Accent token for the calendar (e.g., 'primary', 'success'). |
None
|
hide_window_chrome
|
bool
|
If True, shows the dialog with override-redirect to hide window decorations. |
False
|
on_result
|
Optional[Callable[[Any], None]]
|
Optional callback receiving the dialog result payload. |
None
|
**kwargs
|
Any
|
Additional arguments including 'position'. |
{}
|
Returns:
| Type | Description |
|---|---|
Optional[date]
|
Selected date or None if canceled. |
get_string
staticmethod
get_string(
prompt: str = "",
title: str = " ",
value: Optional[str] = None,
master: Optional[Misc] = None,
value_format: Optional[str] = None,
on_result: Optional[Callable[[Any], None]] = None,
**kwargs: Any,
) -> Optional[str]
Show a string input dialog.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
prompt
|
str
|
The prompt text to display. |
''
|
title
|
str
|
The dialog window title. |
' '
|
value
|
Optional[str]
|
Initial value for the input field. |
None
|
master
|
Optional[Misc]
|
Parent widget for the dialog. |
None
|
value_format
|
Optional[str]
|
Optional ICU format pattern for parsing/formatting. |
None
|
on_result
|
Optional[Callable[[Any], None]]
|
Optional callback receiving the dialog result payload. |
None
|
**kwargs
|
Any
|
Additional arguments including 'position'. |
{}
|
Returns:
| Type | Description |
|---|---|
Optional[str]
|
Input string or None if canceled. |
get_item
staticmethod
get_item(
prompt: str = "",
title: str = " ",
value: Optional[str] = None,
items: Optional[List[str]] = None,
master: Optional[Misc] = None,
on_result: Optional[Callable[[Any], None]] = None,
**kwargs: Any,
) -> Optional[str]
Show a dropdown selection dialog.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
prompt
|
str
|
The prompt text to display. |
''
|
title
|
str
|
The dialog window title. |
' '
|
value
|
Optional[str]
|
Initial value for the input field. |
None
|
items
|
Optional[List[str]]
|
List of items to choose from. |
None
|
master
|
Optional[Misc]
|
Parent widget for the dialog. |
None
|
on_result
|
Optional[Callable[[Any], None]]
|
Optional callback receiving the dialog result payload. |
None
|
**kwargs
|
Any
|
Additional arguments including 'position'. |
{}
|
Returns:
| Type | Description |
|---|---|
Optional[str]
|
Selected item or None if canceled. |
get_integer
staticmethod
get_integer(
prompt: str = "",
title: str = " ",
value: Optional[int] = None,
minvalue: Optional[int] = None,
maxvalue: Optional[int] = None,
master: Optional[Misc] = None,
value_format: Optional[str] = None,
increment: Optional[int] = None,
on_result: Optional[Callable[[Any], None]] = None,
**kwargs: Any,
) -> Optional[int]
Show an integer input dialog with validation.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
prompt
|
str
|
The prompt text to display. |
''
|
title
|
str
|
The dialog window title. |
' '
|
value
|
Optional[int]
|
Initial value for the input field. |
None
|
minvalue
|
Optional[int]
|
Minimum allowed value. |
None
|
maxvalue
|
Optional[int]
|
Maximum allowed value. |
None
|
increment
|
Optional[int]
|
Step size for increment/decrement buttons. |
None
|
value_format
|
Optional[str]
|
Optional ICU format pattern for parsing/formatting. |
None
|
master
|
Optional[Misc]
|
Parent widget for the dialog. |
None
|
on_result
|
Optional[Callable[[Any], None]]
|
Optional callback receiving the dialog result payload. |
None
|
**kwargs
|
Any
|
Additional arguments including 'position'. |
{}
|
Returns:
| Type | Description |
|---|---|
Optional[int]
|
Integer value or None if canceled. |
get_float
staticmethod
get_float(
prompt: str = "",
title: str = " ",
value: Optional[float] = None,
minvalue: Optional[float] = None,
maxvalue: Optional[float] = None,
master: Optional[Misc] = None,
value_format: Optional[str] = None,
increment: Optional[float] = None,
on_result: Optional[Callable[[Any], None]] = None,
**kwargs: Any,
) -> Optional[float]
Show a float input dialog with validation.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
prompt
|
str
|
The prompt text to display. |
''
|
title
|
str
|
The dialog window title. |
' '
|
value
|
Optional[float]
|
Initial value for the input field. |
None
|
minvalue
|
Optional[float]
|
Minimum allowed value. |
None
|
maxvalue
|
Optional[float]
|
Maximum allowed value. |
None
|
master
|
Optional[Misc]
|
Parent widget for the dialog. |
None
|
value_format
|
Optional[str]
|
Optional ICU format pattern for parsing/formatting. |
None
|
increment
|
Optional[float]
|
Step size for increment/decrement buttons. |
None
|
on_result
|
Optional[Callable[[Any], None]]
|
Optional callback receiving the dialog result payload. |
None
|
**kwargs
|
Any
|
Additional arguments including 'position'. |
{}
|
Returns:
| Type | Description |
|---|---|
Optional[float]
|
Float value or None if canceled. |
get_font
staticmethod
get_font(
master: Optional[Misc] = None, **kwargs: Any
) -> Any
Show a font selection dialog.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
master
|
Optional[Misc]
|
Parent widget for the dialog. |
None
|
**kwargs
|
Any
|
Additional arguments including 'position'. |
{}
|
Returns:
| Type | Description |
|---|---|
Any
|
Selected font or None if canceled. |