I have noticed that an UltraTextEditor will accept almost every varation of CTRL+ except CTRL+A. Is this the way the control should work or do I have something set wrong? I have already programmed around this by adding my own keypreview but would like to know if I could have done something different when adding the control. Thanks.
If EnableVisualStyles is not set on project it does not work (CTRL+A). I added this:
Application.EnableVisualStyles()Hope this helps!
On UltraTextEditor's event OnKeyDown you can write this:
private void Note_TextEditor_KeyDown(object sender, KeyEventArgs e)
{
if (e.KeyCode == Keys.A && e.Modifiers == Keys.Control)
this.Note_TextEditor.SelectAll();
}
Hi, I tried but seems not working when pressing CTRL + A. It'll not select whole text in UltraTextEditor. But it'll work in UltraFormattedTextEditor.
I'm using version 8.1.20081.1000.
I noticed the same problem with the windows TextBox control. Apparently, they do not support CTRL-A.
Here is some VB code to add the functionality:
http://vb-helper.com/howto_net_handle_ctrl_a.html
Private Sub TextBox2_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles _ TextBox2.KeyPress If e.KeyChar = Convert.ToChar(1) Then DirectCast(sender, TextBox).SelectAll() e.Handled = True End If End Sub
Hi,
I just tested this out by placing a new UltraTextEditor on a form. When I click into the control and press CTRL+A, it selects all of the text.
So I'm not sure why it's not working for you. Maybe something else in your application is using CTRL+A for a shortcut - like perhaps a toolbar or menu item is eating the keystroke so it never gets to the UltraTextEditor.
If you put a regular TextBox control on the same form, does it work?