TX Text Control ActiveX

FormDateFieldInsert Method

Method

This method inserts a date field into the document at the current text input position.

Introduced: 28.0.

Syntax

TXTextControl.FormDateFieldInsert Date, ShowDateControl [, EmptyWidth [, Format]]

Parameters

ParameterDescription
DateSpecifies a date. The user can change this date through a date control. When this parameter does not contain a date, the new date field is empty.
ShowDateControlSpecifies whether the date control is immediately shown after insertion.
EmptyWidthOptional. Specifies the width of the date field, in twips, when there is no date selected. If this parameter is omitted, a default width of 2000 twips is used.
FormatOptional. Specifies the format how to display the date. It can be a Day, Month, Year, and Era Format Picture string. When this parameter is omitted a default format is used depending on the language set for the date field's text.

Return Value

The method returns True if the date field could be inserted, otherwise it returns False.

Data Types

NameData type
DateDate
ShowDateControlBoolean
EmptyWidthInteger
FormatString
Return valueBoolean

Remarks

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

See Also