Your DesktopX Documentation Resource Guide
Documentation Home
Quick Start
User's Guide
Developer's Guide
Resources
Tutorials
By now you should realize just w
Forms
Forms is a new feature introduced in DesktopX 3.1. They are a sort of
enhanced input box and are very similar to widget preferences.
You can use forms to prompt an input dialog to the user. Input elements are
the same as the widget preference types:
You can create a work by calling:
Set frm = DesktopX.CreateForm
You can add input controls by calling:
frm.AddPreference "Text1"
frm.Preference("Text1").Type = "Text"
frm.Preference("Text1").DefaultValue = "Sample text pref"
frm.Preference("Text1").Caption = "Default text"
frm.Preference("Text1").Description = "This is a sample description"
To prompt the form simply call:
frm.Prompt
Then you can retrieve the form return values using:
frm.Preference("Text1").value
Reference
DesktopX.CreateForm
It returns a new form object.
Form.Caption
Gets/sets the form's caption.
Form.OkButton
Gets/sets the form's Ok button text.
Form.CancelButton
Gets/sets the form's Cancel button text.
Form.Prompt
Prompts the form. It returns true if the user chose the Ok button, false
otherwise.
Form.AddPreference "name"
Adds a new input item to the form. Input preference items are identical to
widget preferences, so you can go here.
|