User Tools

Site Tools


settextrtf_code_template.htm
Navigation:  Templates > Guide to all Templates > Additional Libraries and Templates > Rich Text Template Support - Overview >====== SetTextRTF code template ====== Previous pageReturn to chapter overviewNext page

NoteBox.jpg

This template (and its associated code templates) has been deprecated, and is now replaced by the RTF Text Control template.

The SetTextRTF code template is used to place the text to a specified position in the a rich text control. The text to place comes from the specified string or variable. This template calls the SetText method. There are four parameters for this method. They are the string or variable to get text to, allow undo, the starting position to get text from, and the ending position to get text from. If the start and end positions are not available the current cursor position is used.

Prototype:

SetText( GetTextTo, [AllowUndo], [StartPos], [EndPos] )

Example method calls:

oRTF_RTFTextBox.SetText( loc:find, 0, ) !place text at current position

oRTF_RTFTextBox.SetText( loc:find, 10, 20) !place text at specified

!position

Template Prompts:

Associated RTF control

Select the RTF control from the drop-down list. All controls on the Window are included in the list. This field in required.

String to Variable Receive Text

Specify a string or variable that will place the specified text. The text will be placed at the current cursor position if no starting and ending positions are specified. If positions are specified the text will be placed at at these positions.

Allow Undo

Check this box to allow the placement of text to be saved into the undo buffer. This allows the undo method to be called for this action. Clear the box to not save the undo action.

Starting Position or variable (prefixed with !)

Specify the starting character position to place the text to. A variable may be used. To use a variable, precede it with an exclamation point (!).

Ending Position or variable (prefixed with !)

Specify the ending character position to place the text to. A variable may be used. To use a variable, precede it with an exclamation point (!).

settextrtf_code_template.htm.txt · Last modified: 2021/04/15 15:57 (external edit)