TX Text Control ActiveX

What's New in TX Text Control ActiveX 28.0

Topic

TX Text Control ActiveX 28.0 is the first version shipped in 32-bit and 64-bit editions. It also added form fields for designing and filling forms, and it reworked link targets and bookmarks in a way that requires changes to existing code. The sections below list what version 28.0 added and changed since version 27.0, and what to adapt when you upgrade.

New Features

  • 32-bit and 64-bit versions. TX Text Control ActiveX now ships as a 32-bit and a 64-bit version. Both versions can be registered on the same computer and share the same GUIDs. The Microsoft Foundation Classes library has been updated from version 6.0 to version 9.0 (MFC90U.DLL).

  • Form fields. Special form fields support designing and filling forms. FormTextFieldInsert, FormCheckBoxInsert, FormComboBoxInsert, FormDropDownListInsert and FormDateFieldInsert insert them.

    • Text form fields are text input fields of a form. An empty one can be set to a specified width, so that the end user sees where to enter text.
    • Check boxes are checked or unchecked by the end user. The field itself can't be edited: its text is set either to the Unicode character for the checked state or to the character for the unchecked state.
    • Combo boxes and drop-down lists offer the end user a list of items to select from. The text of a combo box can be edited as well.
    • Date fields manage and format a date. The end user selects the date in a date control or enters it as text.
    • Field data. Several properties change field-specific data, such as the items, the date, the date format or the check box characters. The programming category Form Fields lists them.
    • Field identifiers. The field identifier that FieldCurrent provides works with all Field... properties and methods, such as FieldText and FieldDelete.
    • Events. New events report that the content of a form field has changed. FormCheckStateChanged and FormDateChanged report a changed check state or date, FormSelectedItemChanged a new selected item of a combo box or drop-down list, and FormFieldTextChanged occurs when the text of a text form field has changed.
    • Protected documents. The DocumentPermissions property has been extended with the txAllowEditingFormFields setting, so that form fields can be edited when EditMode is changed from Edit to Protected or Password Protected.
    • File formats. Form fields are saved and loaded with the TX Text Control format (.tx) and with the .doc, .docx and .rtf formats.
    • Microsoft Word form fields. Depending on the txLoadMSWordFields and txLoadFormFields attributes of the LoadSaveAttribute property, Microsoft Word form fields are converted either to TX Text Control form fields or to fields of the type txFieldMSWord. When both attributes are True, check boxes, text form fields, combo boxes, drop-down lists and date fields are converted to TX Text Control form fields, and all other fields are converted to text fields of the type txFieldMSWord.

    A form with shaded text form fields for a name, a phone number, a date of birth and a state in the TXWords sample of TX Text Control ActiveX 34.0.

  • Link targets and bookmarks. A link target or bookmark can now be inserted at any text position, even inside a text field or hypertext link or at its beginning or end. Several targets can be inserted at the same text position. A new set of properties and methods handles targets and bookmarks; Link Targets and Bookmarks lists them. See Update Notes for the change this requires in existing code.

New Properties, Methods and Events

Version 28.0 adds members to TXTextControl for form fields and for link targets and bookmarks.

Properties

MemberDescription
TXTextControl.FormFieldCheckedCharSets or returns the character that displays a check box in the checked state.
TXTextControl.FormFieldCheckedCharsReturns the characters that can display a check box in the checked state.
TXTextControl.FormFieldDateSets or returns the date of a date field.
TXTextControl.FormFieldDateFormatSets or returns the format string that displays the date of a date field.
TXTextControl.FormFieldDateFormatsReturns format picture strings that can format the date.
TXTextControl.FormFieldEmptyWidthSets or returns the width of a combo box, drop-down list, date field or text form field that is used when the field is empty.
TXTextControl.FormFieldItemsSets or returns the items of a combo box or drop-down list as a sequence of strings separated by TAB (9) characters.
TXTextControl.FormFieldUncheckedCharSets or returns the character that displays a check box in the unchecked state.
TXTextControl.FormFieldUncheckedCharsReturns the characters that can display a check box in the unchecked state.
TXTextControl.TargetAtInputPosReturns the target identifier of the target at the current text input position.
TXTextControl.TargetDataRelates numeric or string data to a link target.
TXTextControl.TargetNameReturns or sets the name of a link target.
TXTextControl.TargetPosReturns the position of a target.
TXTextControl.TargetStartReturns the target's character index, one-based, in the document.

Methods

MemberDescription
TXTextControl.FormCheckBoxInsertInserts a check box field into the document at the current text input position.
TXTextControl.FormComboBoxInsertInserts a combo box into the document at the current text input position.
TXTextControl.FormDateFieldInsertInserts a date field into the document at the current text input position.
TXTextControl.FormDropDownListInsertInserts a drop-down list into the document at the current text input position.
TXTextControl.FormTextFieldInsertInserts a text input field for a form into the document at the current text input position.
TXTextControl.TargetDeleteDeletes a link target or bookmark from the document.
TXTextControl.TargetGotoSets the current text input position to the position of the specified link target and scrolls the text so that this position is at the top of the control's visible text.
TXTextControl.TargetInsertInserts a new link target or bookmark in the text at the current text input position.
TXTextControl.TargetNextReturns the identifier of the link target that follows the specified target in the current text of TXTextControl.

Events

MemberDescription
TXTextControl.FormCheckStateChangedOccurs when the check state of a check box has been changed.
TXTextControl.FormDateChangedOccurs after the date of a date form field has been changed.
TXTextControl.FormFieldTextChangedOccurs after the text of a text form field has been changed.
TXTextControl.FormSelectedItemChangedOccurs after the selected item of a combo box or a drop-down list has been changed.
TXTextControl.TargetCreatedOccurs when a link target or bookmark has been created.
TXTextControl.TargetDeletedOccurs when a link target or bookmark has been deleted.

Extended Properties, Methods and Events

MemberChange
DocumentPermissions propertyExtended with the txAllowEditingFormFields setting.
DisplayColor propertyExtended with two new colors: txFormFieldColor is the highlight color of a form field, and txActiveFormFieldColor is the highlight color of the form field that contains the current text input position.
FieldNext methodExtended to support the new field types txFieldCheckBox, txFieldComboBox, txFieldFormText and txFieldDate.
FieldType propertyExtended to support the new field types txFieldCheckBox, txFieldComboBox, txFieldFormText and txFieldDate.
LoadSaveAttribute propertyExtended with the txLoadFormFields attribute. When it is set to True, Microsoft Word fields are converted to TX Text Control form fields, which are check boxes, text form fields, combo boxes, drop-down lists and date fields. All other Microsoft Word fields are still converted to text fields of the type txFieldMSWord when the txLoadMSWordFields attribute is set to True.

Update Notes

  • Link targets are no longer text fields. To allow link targets and bookmarks at any text position, a document target is no longer a text field, and the FieldType txFieldLinkTarget is no longer supported. Existing code that handles targets must be adapted to the new properties and methods listed in Link Targets and Bookmarks.