20Jan/11Off
How can I show a message box using Python script in NiceForm or NiceLabel Portal?
import sys
if sys.platform == 'silverlight':
from System.Windows import *
result = MessageBox.Show("Would you like to see the simple version?", "MessageBox Example", MessageBoxButton.OKCancel);
if result == MessageBoxResult.OK:
MessageBox.Show("No caption, one button.");
else:
import win32gui
import win32con
result = win32gui.MessageBox(0, "Would you like to see the simple version?", "MessageBox Example", win32con.MB_YESNO);
if result == win32con.IDYES:
win32gui.MessageBox(0, "No caption, one button.", "", win32con.MB_OK);
There is no single way to display message box both in NiceForm and in NiceLabel Portal. So the previous code snippet shows how you can do it on both platforms.
Tagged as: message box, niceform, nicelabel portal, python, scripting
No Comments
Categories
Tags
actions
barcodes
button
check box
code
combo box
database navigator
databases
database search
design
design mode
edit field
excel
file formats
form
frame
functions
graphics
ironpython
label
label structure report
languages
list box
localization
memo field
message box
niceform
nicelabel
nicelabel portal
objects
picture
position
preview
programming
python
radio group
run mode
scripting
sdk
silverlight
table
text
variable prompt
variables
vbscript