showdialog/README.md

26 lines
771 B
Markdown
Raw Normal View History

2022-08-10 12:42:34 +03:00
# showdialog
Simple module for showing GTK dialog.
## Install
```bash
pip install showdialog
```
## Usage
### showdialog.show_msg(title, text, sectext, btns, msgtype)
Opens GTK MessageDialog
#### Args
2022-08-10 12:50:06 +03:00
- title (`str`): Dialog caption
- text (`Union[Tuple[Optional[str], bool], Optional[str]]`): Dialog primary text, str or tuple `(text, use_markup)`
- sectext (`Union[Tuple[Optional[str], bool], Optional[str]]`, optional): Dialog secondary text, str or tuple. Defaults to `None`.
- btns (`Gtk.ButtonsType`, optional): Dialog buttons. Defaults to `Gtk.ButtonsType.OK`.
- msgtype (`Gtk.MessageType`, optional): Dialog message type. Defaults to `Gtk.MessageType.INFO`.
2022-08-10 12:42:34 +03:00
#### Example:
```python
from showdialog import show_msg
show_msg(title='', text='Hello world!')
```