SharpDevelop Community

Get your problems solved!
Welcome to SharpDevelop Community Sign in | Join | Help
in Search

How can I catch Backspace keystroke?

Last post 07-06-2008 5:39 PM by bluemas. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 07-04-2008 2:39 PM

    How can I catch Backspace keystroke?

     I'd like to catch Backspace keystroke. So I added Keydown event handler to owner of TextEditor class.

     But when I type Backspace key, message box didn't appear. Delete key is the same.

     Could any one tell me how to catch backspace keystroke?

     

            void InitTextEditor()

            {

                 editor.ActiveTextAreaControl.TextArea.KeyDown += new System.Windows.Forms.KeyEventHandler(this.editor_KeyDown);

            }

            private void editor_KeyDown(object sender, KeyEventArgs e)
            {
                if (e.KeyCode == Keys.Back)
                {
                    MessageBox.Show("Backspace!!!");

                }
            }

     

  • 07-05-2008 10:01 AM In reply to

    Re: How can I catch Backspace keystroke?

    Add an event handler for the TextArea's DoProcessDialogKey event. This is where keys such as Enter, Back, Left, Right, etc can be captured.
  • 07-06-2008 5:39 PM In reply to

    Re: How can I catch Backspace keystroke?

    Thank you~ :D

Page 1 of 1 (3 items)
Powered by Community Server (Commercial Edition), by Telligent Systems
Don't contact us via this (fleischfalle@alphasierrapapa.com) email address.