TX Text Control ActiveX

FormDropDownListInsert Method

Method

This method inserts a dropdown list into the document at the current text input position. It has the specified items, the SelectedIndex parameter determines which item is selected. The text field cannot be edited through the end-user.

Introduced: 28.0.

Syntax

TXTextControl.FormDropDownListInsert Items, SelectedIndex, ShowDropDownArrow [, EmptyWidth]

Parameters

ParameterDescription
ItemsSpecifies the dropdown list's items. The items must be separated with 09 (TAB) control characters.
SelectedIndexSpecifies the zero-based index of the item which is currently selected. If this parameter is -1, no item is selected.
ShowDropDownArrowSpecifies whether the dropdown arrow is immediately shown after insertion.
EmptyWidthOptional. Specifies the width of the dropdown list, in twips, when there is no item selected. If this parameter is omitted, a default width of 2000 twips is used.

Return Value

The method returns True if the dropdown list could be inserted, otherwise it returns False.

Data Types

NameData type
ItemsString
SelectedIndexInteger
ShowDropDownArrowBoolean
EmptyWidthInteger
Return valueBoolean

Remarks

Inserting a form field changes the value of the FieldCurrent property to the identifier of the newly created field.

See Also