Description:
Creates a new drop-down combo box. (Returns an object of class TComboBox.)
Notes:
Parameters
Left (This is an integer value for the left position of the combo box on the form.)
Top (This is an integer value for the top position of the combo box on the form.)
Text (This is a string value for the default combo box text.)
This would create a combo box on a sample form with the default value of Item 1, and possible drop-down values of Item 1, Item2, and Item 3. The user will also be able to type a custom value (regardless of what options are in the drop-down), similar to an edit box. Copy and paste the code into a New PlanSwift Script.
Pascal Example:
Form := NewForm(230, 150, 'Sample Form');
NewLabel(26,23,'Name:');
Spacing := NewComboBox(24,48,'Item 1');
Spacing.Items.Add('Item 1');
Spacing.Items.Add('Item 2');
Spacing.Items.Add('Item 3');
if Form.ShowModal <> mrOk then
Exit;
Visual Basic Example:
Form = NewForm(230, 150, "Sample Form")
NewLabel(26,23,"Name:")
Spacing = NewComboBox(24,48,"Item 1")
Spacing.Items.Add("Item 1")
Spacing.Items.Add("Item 2")
Spacing.Items.Add("Item 3")
if Form.ShowModal <> mrOk then
Exit Function
end if
Enterprise and Developer editions