MessageBox
Static methods for displaying standard message dialogs.
show_info
staticmethod
show_info(
message: str,
title: str = " ",
master: Optional[Misc] = None,
alert: bool = False,
**kwargs: Any,
) -> Optional[str]
Display an info dialog with OK button and info icon.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
message
|
str
|
The message text to display. |
required |
title
|
str
|
The dialog window title. |
' '
|
master
|
Optional[Misc]
|
Parent widget for the dialog. |
None
|
alert
|
bool
|
If True, rings the system bell. |
False
|
**kwargs
|
Any
|
Additional arguments including 'position'. |
{}
|
Returns:
| Type | Description |
|---|---|
Optional[str]
|
The text of the button pressed. |
show_warning
staticmethod
show_warning(
message: str,
title: str = " ",
master: Optional[Misc] = None,
alert: bool = True,
**kwargs: Any,
) -> Optional[str]
Display a warning dialog with OK button and warning icon.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
message
|
str
|
The message text to display. |
required |
title
|
str
|
The dialog window title. |
' '
|
master
|
Optional[Misc]
|
Parent widget for the dialog. |
None
|
alert
|
bool
|
If True, rings the system bell. |
True
|
**kwargs
|
Any
|
Additional arguments including 'position'. |
{}
|
Returns:
| Type | Description |
|---|---|
Optional[str]
|
The text of the button pressed. |
show_error
staticmethod
show_error(
message: str,
title: str = " ",
master: Optional[Misc] = None,
alert: bool = True,
**kwargs: Any,
) -> Optional[str]
Display an error dialog with OK button and error icon.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
message
|
str
|
The message text to display. |
required |
title
|
str
|
The dialog window title. |
' '
|
master
|
Optional[Misc]
|
Parent widget for the dialog. |
None
|
alert
|
bool
|
If True, rings the system bell. |
True
|
**kwargs
|
Any
|
Additional arguments including 'position'. |
{}
|
Returns:
| Type | Description |
|---|---|
Optional[str]
|
The text of the button pressed. |
show_question
staticmethod
show_question(
message: str,
title: str = " ",
master: Optional[Misc] = None,
alert: bool = False,
**kwargs: Any,
) -> Optional[str]
Display a question dialog with OK button and question icon.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
message
|
str
|
The message text to display. |
required |
title
|
str
|
The dialog window title. |
' '
|
master
|
Optional[Misc]
|
Parent widget for the dialog. |
None
|
alert
|
bool
|
If True, rings the system bell. |
False
|
**kwargs
|
Any
|
Additional arguments including 'position'. |
{}
|
Returns:
| Type | Description |
|---|---|
Optional[str]
|
The text of the button pressed. |
ok
staticmethod
ok(
message: str,
title: str = " ",
master: Optional[Misc] = None,
alert: bool = False,
**kwargs: Any,
) -> Optional[str]
Display a dialog with an OK button.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
message
|
str
|
The message text to display. |
required |
title
|
str
|
The dialog window title. |
' '
|
master
|
Optional[Misc]
|
Parent widget for the dialog. |
None
|
alert
|
bool
|
If True, rings the system bell. |
False
|
**kwargs
|
Any
|
Additional arguments including 'position'. |
{}
|
Returns:
| Type | Description |
|---|---|
Optional[str]
|
The text of the button pressed. |
okcancel
staticmethod
okcancel(
message: str,
title: str = " ",
master: Optional[Misc] = None,
alert: bool = False,
**kwargs: Any,
) -> Optional[str]
Display a dialog with OK and Cancel buttons.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
message
|
str
|
The message text to display. |
required |
title
|
str
|
The dialog window title. |
' '
|
master
|
Optional[Misc]
|
Parent widget for the dialog. |
None
|
alert
|
bool
|
If True, rings the system bell. |
False
|
**kwargs
|
Any
|
Additional arguments including 'position'. |
{}
|
Returns:
| Type | Description |
|---|---|
Optional[str]
|
The text of the button pressed. |
yesno
staticmethod
yesno(
message: str,
title: str = " ",
master: Optional[Misc] = None,
alert: bool = False,
**kwargs: Any,
) -> Optional[str]
Display a dialog with Yes and No buttons.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
message
|
str
|
The message text to display. |
required |
title
|
str
|
The dialog window title. |
' '
|
master
|
Optional[Misc]
|
Parent widget for the dialog. |
None
|
alert
|
bool
|
If True, rings the system bell. |
False
|
**kwargs
|
Any
|
Additional arguments including 'position'. |
{}
|
Returns:
| Type | Description |
|---|---|
Optional[str]
|
The text of the button pressed. |
yesnocancel
staticmethod
yesnocancel(
message: str,
title: str = " ",
master: Optional[Misc] = None,
alert: bool = False,
**kwargs: Any,
) -> Optional[str]
Display a dialog with Yes, No, and Cancel buttons.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
message
|
str
|
The message text to display. |
required |
title
|
str
|
The dialog window title. |
' '
|
master
|
Optional[Misc]
|
Parent widget for the dialog. |
None
|
alert
|
bool
|
If True, rings the system bell. |
False
|
**kwargs
|
Any
|
Additional arguments including 'position'. |
{}
|
Returns:
| Type | Description |
|---|---|
Optional[str]
|
The text of the button pressed. |
retrycancel
staticmethod
retrycancel(
message: str,
title: str = " ",
master: Optional[Misc] = None,
alert: bool = False,
**kwargs: Any,
) -> Optional[str]
Display a dialog with Retry and Cancel buttons.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
message
|
str
|
The message text to display. |
required |
title
|
str
|
The dialog window title. |
' '
|
master
|
Optional[Misc]
|
Parent widget for the dialog. |
None
|
alert
|
bool
|
If True, rings the system bell. |
False
|
**kwargs
|
Any
|
Additional arguments including 'position'. |
{}
|
Returns:
| Type | Description |
|---|---|
Optional[str]
|
The text of the button pressed. |