We've discussed text boxes in the In Depth section of this chapter and already put them to use throughout the book. Take a look at Tables 5.5, 5.6, and 5.7 to see the notable properties, methods, and events of the TextBox class. These tables do not include all the notable properties, methods, and events this class inherits from the Control class—you'll find them in Tables 5.1, 5.2, and 5.3.
Methods |
Means |
---|---|
AppendText |
Appends text to the current text in the text box. |
Clear |
Clears all text from the text box. |
ClearUndo |
Clears information about the most recent operation of the text box. |
Copy |
Copies the selected text in the text box to the Clipboard. |
Cut |
Moves the selected text in the text box to the Clipboard. |
Paste |
Replaces the selected text in the text box with the contents of the Clipboard. |
ScrollToCaret |
Scrolls the text box to the caret position. |
Select |
Selects text in the text box. |
SelectAll |
Selects all text in the text box. |
Undo |
Undoes the last edit operation in the text box. |
Event |
Means |
---|---|
AutoSizeChanged |
Occurs when the value of the AutoSize property is changed. |
Click |
Occurs when the text box is clicked. |
ReadOnlyChanged |
Occurs when the value of the ReadOnly property is changed. |