Custom Values and Settings Window

Shows how to create a custom dialog window that prompts the user to enter values and settings.  Supports inputs: integer, real (float), checkbox and text.

# create windows object
Win = Windows()
# construct list of items for the window
Options = []
# ask user for text
Options.append(['Name of the item', WindowsInputTypes.String, 'Baz'])
# ask user for a floating point (real) value
Options.append(['Scale', WindowsInputTypes.Real, 1.234])
# checkbox
Options.append(['Enabled', WindowsInputTypes.Boolean, True])
# ask user for an integer
Options.append(['Count', WindowsInputTypes.Integer, 123456])
# show window and output results
# if user closes window or clicks on Cancel button then Values will be set to 'None'
Values = Win.OptionsDialog('Test', Options)
print Values

Did you find it helpful? Yes No

Send feedback
Sorry we couldn't be helpful. Help us improve this article with your feedback.