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.


6/30 

Stardock prepares major update for Sins of a Solar Empire through an open beta

6/27 

Stardock releases first update to The Political Machine

6/26 

Epic Carnage Arrives with the Unreal Series

6/24 

Discover the Truth in Belief & Betrayal

6/23 

Conquer Germania for the Glory of Rome!

6/17 

The Political Machine 2008 Now Available

6/17 

Stardock Launches Impulse: The PC's Next-Generation Distribution Platform

6/5 

Conquer Britannia in the First Imperium Romanum Booster