ITMSFNCCustomPDFFormFieldsLib.AddComboBox Method
Adds a combo box field with items from the specified string array.
API unit family: TMSFNCPDFLib
Declaring type: ITMSFNCCustomPDFFormFieldsLib
Overloads
Overload 1
Adds a combo box field with items from the specified string array.
function AddComboBox(AFieldName: string; ARect: TRectF; AItems: TTMSFNCPDFLibStringArray; AItemIndex: Integer = -1; AEditable: Boolean = False; AReadOnly: Boolean = False; AHidden: Boolean = False): ITMSFNCCustomPDFFormFieldComboBox; overload;
virtual _di_ITMSFNCCustomPDFFormFieldComboBox __fastcall AddComboBox(System::UnicodeString AFieldName, const System::Types::TRectF &ARect, TTMSFNCPDFLibStringArray AItems, int AItemIndex = 0xffffffff, bool AEditable = false, bool AReadOnly = false, bool AHidden = false) = 0 /* overload */;
Parameters
| Name | Description |
|---|---|
AFieldName |
Unique name for the field in the PDF form. |
ARect |
Bounding rectangle of the field in PDF coordinate units. |
AItems |
Array of option strings to populate the combo box. |
AItemIndex |
Zero-based index of the initially selected item; -1 selects none. |
AEditable |
When True, users can type a custom value. |
AReadOnly |
When True, the field is read-only in the PDF viewer. |
AHidden |
When True, the field is invisible in the PDF viewer. |
Returns
Interface reference to the newly created combo box field.
Overload 2
Adds a combo box field with items from the specified string list.
function AddComboBox(AFieldName: string; ARect: TRectF; AItems: TStrings; AItemIndex: Integer = -1; AEditable: Boolean = False; AReadOnly: Boolean = False; AHidden: Boolean = False): ITMSFNCCustomPDFFormFieldComboBox; overload;
virtual _di_ITMSFNCCustomPDFFormFieldComboBox __fastcall AddComboBox(System::UnicodeString AFieldName, const System::Types::TRectF &ARect, System::Classes::TStrings* AItems, int AItemIndex = 0xffffffff, bool AEditable = false, bool AReadOnly = false, bool AHidden = false) = 0 /* overload */;
Parameters
| Name | Description |
|---|---|
AFieldName |
Unique name for the field in the PDF form. |
ARect |
Bounding rectangle of the field in PDF coordinate units. |
AItems |
String list whose items populate the combo box. |
AItemIndex |
Zero-based index of the initially selected item; -1 selects none. |
AEditable |
When True, users can type a custom value. |
AReadOnly |
When True, the field is read-only in the PDF viewer. |
AHidden |
When True, the field is invisible in the PDF viewer. |
Returns
Interface reference to the newly created combo box field.