XamRichTextEditor("Identifier").SetCaretLocation 25
This topic provides information about recording and replaying actions using the xamRichTextEditor™ control’s testable user methods.
This topic contains the following sections:
Sets the caret location of the text.
The following table explains the method’s parameter followed by code example.
Use the following action for setting the caret location to between the 25th and 26th characters overall.
XamRichTextEditor("Identifier").SetCaretLocation 25
None
Selects all the text from the current caret position to the provided location.
The following table explains the method’s parameter.
Use the following action for selecting from the current caret position up to between the 25th and 26th overall characters, the following action should be used.
XamRichTextEditor("Identifier").SelectToLocation 25
None
Sends a string of characters to the current caret position.
The following table explains the method’s parameter followed by code example.
To send the string “Hello” to the current caret position.
XamRichTextEditor("Identifier").SendString “Hello”
To send the string “Hi,” followed by a line-feed (SHIFT + Enter
); with “Bob” on the following line, and a carriage return (Enter
) to start a new paragraph.
XamRichTextEditor("Identifier").SendString vbTab + “Hi,” + vbLF + “Bob” +vbCR
The following list contains the possible exceptions to this method and the likely reasons causing them.
The operation cannot be performed because the xamRichTextEditor does not have a document loaded.
Editing is not allowed.
The text supplied was not sent because it contained a tab, which the xamRichTextEditor did not accept.
Sends a number of Delete keys to the xamRichTextEditor 's current caret location.
The following table explains the method’s parameter followed by code example.
Deletes 5 characters back from the current caret location.
XamRichTextEditor("Identifier").DeleteXCharacters 5
The following list contains the possible exceptions to this method and the likely reasons causing them.
The operation cannot be performed because the xamRichTextEditor does not have a document loaded
Editing is not allowed
Sends the number of backspace characters to the x amRichTextEditor 's current caret location.
The following table explains the method’s parameter followed by code example.
Starting from the current caret location press the Backspace
key 5 times.
XamRichTextEditor("Identifier").BackspaceXCharacters 5
The following list contains the possible exceptions to this method and the likely reasons causing them.
The operation cannot be performed because the xamRichTextEditor does not have a document loaded.
Editing is not allowed.
Sets the active view of the xamRichTextEditor .
The following table explains the method’s parameter followed by code example.
To change the active view to the upper view location.
XamRichTextEditor("Identifier").SetActiveView rtedUpper
The possible exception to this method and the likely reasons causing it is that it cannot set the View to that view as the xamRichTextEditor view is not split.
Splits the view, and/or set the location of the splitter.
The following table explains the method’s parameter followed by code examples.
Moves or creates a new splitter, if one did not exist before, to a position of 100 pixels.
XamRichTextEditor("Identifier").SetSplitter 100
Removes an existing splitter.
XamRichTextEditor("Identifier").SetSplitter
The possible exception to this method and the likely reason causing it is that the specified value (iSplitterPosition
) is out of range.
Sets the zoom level for the editor.
The following table explains the method’s parameter followed by code examples.
Sets the zoom level to 300%.
XamRichTextEditor("Identifier").SetZoomLevel 300
Resets the zoom level to 100%.
XamRichTextEditor("Identifier").SetZoomLevel
None.
Executes a hyperlink by pressing the Ctrl
key and clicking on it.
The following table explains the method’s parameter followed by code examples.
Performing Ctrl+Click
on a hyperlink containing a document offset of 20.
XamRichTextEditor("Identifier").ClickHyperlink 20
Performing Ctrl+Click
on a hyperlink text “ Click here ”.
XamRichTextEditor("Identifier").ClickHyperlink “Click here”
The following is the list of possible exceptions to the method and the likely reason causing them.
There was no hyperlink found at the document offset [oHyperlink]
There was no hyperlink found with the text [oHyperlink]
The supplied Hyperlink argument [oHyperlink] is not one of the expected type(s) listed here: String or Int1
Sets the text formatting based on the current caret position.
The following table explains the method’s parameter followed by code example.
Changes the currently selected text to Bold.
XamRichTextEditor("Identifier").ApplyCharacterSetting rtedBold
The following list contains the possible exceptions to this method and the likely reasons causing them.
The option supplied is not the [rtedCharacterSettings], the only valid option
The operation cannot be performed because the xamRichTextEditor does not have a document loaded.
Editing is not allowed.
Removes the text formatting based on caret position.
The following table explains the method’s parameter followed by a code example.
Removes Bold text setting from the currently selected text to Bold.
XamRichTextEditor("Identifier").RemoveCharacterSetting rtedBold
The following list contains the possible exceptions to this method and the likely reasons causing them.
The option supplied is not the valid [rtedCharacterSettings] option
The operation cannot be performed because the x amRichTextEditor does not have a document loaded
Editing is not allowed
Sets the text alignment based on caret position.
The following table explains the method’s parameter followed by code example.
Aligns the paragraph to the left.
XamRichTextEditor("Identifier").ApplyParagraphSetting rtedAlignLeft
The following list contains the possible exceptions to this method and the likely reasons causing them.
The option supplied is not a valid [rtedParagraphSettings]option
The operation cannot be performed because the xamRichTextEditor does not have a document loaded
Editing is not allowed
Executes the supplied command.
The following table explains the method’s parameter followed by code example.
To copy the selected text to the clipboard.
XamRichTextEditor("Identifier").ExecuteCommand rtedCopy
The possible exceptions to this method are that the option supplied is not one of the valid options, valid options are [{0}]
The following topics provide additional information related to this topic.