pipe
Jun 13, 2020 - 23:25
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!
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
Thank you for the explanation. It is clear for me.