From 4eab0553539c9ffd21dcdfee1f0515c64bc50ea7 Mon Sep 17 00:00:00 2001 From: Gerrishon Date: Wed, 22 Mar 2023 14:22:39 +0300 Subject: [PATCH] update --- README.md | 63 +++++++++++++++++++++++++++++++++++++++++------- docs/dialogs.rst | 2 +- 2 files changed, 55 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index c4d9a9eb..e6d8c4dd 100644 --- a/README.md +++ b/README.md @@ -389,28 +389,73 @@ Message Box dialog from quo.dialog import MessageBox MessageBox( - title="Message pop up window", - text="Do you want to continue?\nPress ENTER to quit." - ) + title='Message window', + text='Do you want to continue?\nPress ENTER to quit.') ``` -![Message Box](https://github.com/scalabli/quo/raw/master/docs/images/messagebox.png) +![Message Box](https://github.com/scalabli/quo/raw/master/docs/images/dialog/message.png) **Example 2** -Input Box dialog +- Input dialog ```python from quo.dialog import InputBox InputBox( - title="InputBox shenanigans", - text="What Country are you from? :" - ) + title='PromptBox Shenanigans', + text='What Country are you from?:') ``` -![Prompt Box](https://github.com/scalabli/quo/raw/master/docs/images/promptbox.png) +![Input Box](https://github.com/scalabli/quo/raw/master/docs/images/dialog/input.png) + + +- Multiline Input dialog + +```python + + from quo.dialog import InputBox + + InputBox( + title='PromptBox Shenanigans', + text='What Country are you from?:', + multiline=True) + +``` +![Input Box](https://github.com/scalabli/quo/raw/master/docs/images/dialog/multiline.png) + +- Password Input dialog + +```python + + from quo.dialog import InputBox + + InputBox( + title='PromptBox Shenanigans', + text='What Country are you from?:', + hide=True) + +``` +![Input Box](https://github.com/scalabli/quo/raw/master/docs/images/dialog/password.png) + +- Radiolist + +```python + + from quo.dialog import RadiolistBox + + RadiolistBox( + title="RadioList dialog example", + text="Which breakfast would you like ?", + values=[ + ("breakfast1", "Eggs and beacon"), + ("breakfast2", "French breakfast"), + ("breakfast3", "Equestrian breakfast") + ]) + +``` +![Radiolist](https://github.com/scalabli/quo/raw/master/docs/images/dialog/radiolist1.png) Read more on [Dialogs](https://quo.readthedocs.io/en/latest/dialogs.html) diff --git a/docs/dialogs.rst b/docs/dialogs.rst index cebab6f2..0243b5b4 100644 --- a/docs/dialogs.rst +++ b/docs/dialogs.rst @@ -39,7 +39,7 @@ input box. It will return the user input as a string. text='What Country are you from?:') .. image:: ./images/dialog/input.png -The ``multiline=True`` option can be passed turn this into a multiline Input box +The ``multiline=True`` parameter can be passed to turn this into a multiline Input box .. image:: ./images/dialog/multiline.png The ``hide=True`` option can be passed to the :func:`~quo.dialog.InputBox` function to turn this into a password input box.