Welcome!
This is the community forum for my apps Pythonista and Editorial.
For individual support questions, you can also send an email. If you have a very short question or just want to say hello — I'm @olemoritz on Twitter.
Multiple dialog choices
-
I’ve read the documentation but it’s not very clear ...
how do I make a dialog alert with multiple choices, and how am I supposed to use them?Thanks in advance!
-
Can you please provide sample code of what you have so far?
-
If you’re talking about a list dialog, just assign a variable when you call it.
result = dialogs.list_dialog(title = 'Title', items = ['A', 'B', 'C'])
If you want like a system dialog, you should use the console module.
http://omz-software.com/pythonista/docs/ios/console.html#console.alert -
@pipe, this alternative works for up to 3 different options.
import console try: selection = console.alert( title='Your Choice', message='Which one do you want?', button1='Option 1', button2='Option 2', button3='Option 3', ) print(f'You selected option {selection}') except KeyboardInterrupt: print('It was too big a decision to make at this point of your life')
-
@mcriley821 thanks
-
This post is deleted!