You might be looking for the property. Setting it to true
would allow your text boxes to implement the Ctrl+A shortcut (among others). From the documentation:
Use the
ShortcutsEnabled
property to enable or disable the following shortcut key combinations:
CTRL+Z
CTRL+E
CTRL+C
CTRL+Y
CTRL+X
CTRL+BACKSPACE
CTRL+V
CTRL+DELETE
CTRL+A
SHIFT+DELETE
CTRL+L
SHIFT+INSERT
CTRL+R
EDIT:
However, the states:The control does not support the CTRL+A shortcut key when the property value is true.
You will probably have to use another subclass of TextBoxBase
, such as , for that to work.
Like other answers indicate, Application.EnableVisualStyles()
should be called. Also the TextBox.ShortcutsEnabled
should be set to true
.
But if your TextBox.Multiline
is enabled then Ctrl+A will not work (). Using RichTextBox
instead will get around the problem.