Textbox validating menu click

In the next example, we will be reading these properties: The example consists of two Text Box controls: One for editing and one for outputting the current selection status to.For this, we set the Is Read Only property to true, to prevent editing of the status Text Box.

It's typically used to capture a single line of text, but can be configured to capture multiple lines of text. Use the Selection Start and Selection Length properties, and the Select and Select All methods, to manipulate the text selection.

Some information relates to pre-released product which may be substantially modified before it’s commercially released. For example, the following commands can be shown when the Text Box is editable.

Microsoft makes no warranties, express or implied, with respect to the information provided here. To modify the commands shown in the context menu, handle the Context Menu Opening event.

For instance, you can set the Selection Start and Selection Length properties to select a custom range of text, or you can use the Selected Text property to insert and select a string.

Just remember that the Text Box has to have focus, e.g.

Leave a Reply