Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Spotifre Message dialog Box action

Tags:

spotfire

I have a report where, once the user clicks a SAVE button it fires a script. Can I do a dialog box where once the user clicks SAVE, A dialog with "Confirm save ... Yes? No? " pops up and when the user clicks Yes it fires the script? I would like this to work on both the web player and desktop

like image 616
Scarlet Knight Avatar asked Apr 20 '15 19:04

Scarlet Knight


1 Answers

You can use the following iron python script for solving this:

import clr
clr.AddReference("System.Windows.Forms")
from System.Windows.Forms import MessageBox, MessageBoxButtons
from System.Windows.Forms import DialogResult

dialogResult = MessageBox.Show("Some question", "Some Title", MessageBoxButtons.YesNo)
if(dialogResult == DialogResult.Yes):
    MessageBox.Show("The answer is YES")
else:
    MessageBox.Show("The answer is NO")
like image 134
Zsuzsa Avatar answered Oct 04 '22 12:10

Zsuzsa