A SubTextPart object represents a user-defined part of a TX Text Control document with a specific Name and ID. The following code can be used to convert the currently selected text into a SubTextPart:
The Name property is set to protected which is simply an identifier in this sample that defines that this SubTextPart should be protected from user changes.
On leaving the SubTextPart, the SubTextPartLeft event is used to switch back to edit mode.
This is just one more application for this new element. This element can be used to store additional information, comments or to highlight text parts permanently in different colors.