ASP.NET: Protected SubTextParts in TXTextControl.Web
SubTextParts in TX Text Control define named text ranges with Start, Length, and Name properties. Version X14 adds subTextPartEntered and subTextPartLeft events to the HTML5-based Web.TextControl, allowing developers to switch editMode and create read-only document sections.

Sub
In general, a Sub
Version X14 (24.0) implements new events for the HTML5-based TXText
On leaving the Sub
The following JavaScript code shows this easy implementation:
function subTextPartEnteredHandler(e) {
if (e.name == "protected")
TXTextControl.editMode = TXTextControl.EditMode.ReadAndSelect;
}
function subTextPartLeftHandler(e) {
TXTextControl.editMode = TXTextControl.EditMode.Edit;
}
TXTextControl.addEventListener("subTextPartEntered", subTextPartEnteredHandler);
TXTextControl.addEventListener("subTextPartLeft", subTextPartLeftHandler);Also See
This post references the following in the documentation:
TX Text Control .NET Server
- TXText
Control. Server Visualization. Text View Generator. Sub Text Part Entered Event - TXText
Control. Server Visualization. Text View Generator. Sub Text Part Left Event - TXText
Control. Sub Text Part Class - TXText
Control. Web Namespace
TX Text Control .NET for Windows Forms
- TXText
Control. Sub Text Part Class - TXText
Control. Sub Text Part. Length Property - TXText
Control. Sub Text Part. Name Property - TXText
Control. Sub Text Part. Start Property - TXText
Control. Text Control. Edit Mode Property
Related Posts
ReportingWindows FormsMail Merge
MailMerge: Conditional Rendering of Merge Blocks
TX Text Control X16 provides two approaches to conditionally render merge blocks within MailMerge templates. Setting RemoveEmptyBlocks removes blocks when child data is absent, while…
ReportingWindows FormsMail Merge
DataSourceManager: Using the Ready-to-Use Reporting Dialog Boxes
The TX Text Control DocumentServer namespace ships with seven ready-to-use reporting dialogs for data selection tasks: chart data relations, filter and sort, database connection, data source…
Merge Blocks in X16: Filtering, Sorting and Conditional Rendering
TX Text Control X16 introduces programmatic merge block insertion through the DataSourceManager API, supporting inline filtering, sorting, and conditional rendering. Block merging conditions…
X15: Adding MS Word Compatible Fields and Form Elements to TXTextControl.Web
TX Text Control X15 adds JavaScript API support for inserting and modifying MS Word compatible fields in the HTML5-based ASP.NET editor. MergeFields, TextFields, and ApplicationFields can be…
X15: Inserting Client-Side Images using JavaScript
TX Text Control X15 adds JavaScript ImageCollection methods to insert client-side images into the HTML5-based ASP.NET editor. A local file is read and converted to a Base64 string, then placed…
