Text | This property is used to set the text inside the TextBox. |
TextAlign | It is used to Set or get the alignment of the text inside the TextBox for example left, centre, and right. |
MaxLength | Used to set or get the maximum number of characters the user can type into the TextBox. |
Multiline | This is used to set or determine whether the TextBox allows multiple lines of text. If press enter it allows you to write in the next line. |
PasswordChar | It is used to set or get the character used to hide text used where showing the password characters. |
ReadOnly | This property is used to set or get whether the TextBox is read-only (users can't edit the text). |
WordWrap | Sets or gets whether the text automatically moves to the next line when it's too long for the box (only for multiline). |
ScrollBars | Sets or gets which type of scroll bars (horizontal, vertical, both, or none) appear in the TextBox. |
Dock | Sets or gets how the TextBox is positioned in its container (e.g., fill, top, left). |
Anchor | Sets or gets which edges of the parent container the TextBox should stay anchored to when resized. |
BorderStyle | Sets or gets the style of the border around the TextBox (e.g., solid line, 3D, no border). |
Enabled | Sets or gets whether the TextBox is enabled (if false , users can't interact with it). |
Focused | This is the commonly used property to check if the TextBox currently has focus if it is selected. |
Font | Sets or gets the font used for the text (like size and style). |
ForeColor | Sets or gets the colour of the text inside the TextBox. |
BackColor | Sets or gets the background colour of the TextBox. |
AcceptsReturn | Sets whether pressing the Enter key adds a new line (used for multi-line TextBox). |
HideSelection | Sets whether selected text is hidden when the TextBox loses focus. |
SelectionStart | It is used to set from where the selected text starts in the TextBox. |
SelectionLength | This property gets or sets the length of the selected text. |
ShortcutsEnabled | It sets the keyboard shortcuts such as copy (Ctrl + C) or paste (Ctrl + P). |
Clear() | This property is used to clear the text inside the TextBox. |
SelectAll() | We can use this property to select all the text inside the TextBox. |