views:

119

answers:

1

I've seen this question circulate around the internet a lot, but haven't found an answer that has solved my problem. I am basically using SpicIE.Controls.Toolbar (C#) to create an explorer bar for IE. It has a few text-boxes on it among other things. The problem I have is that when I am typing in the text-box and hit backspace, the browser handles it and instead of deleting the character on the text-box, it goes back one page on the browser. In order to fix this problem, I created my own custom text box to be able to handle backspace properly:

public class MyTextBox:TextBox
{
    protected override void OnKeyUp(KeyEventArgs e)
    {
        if (e.KeyValue == 8)
        {
            this.Text = this.Text.Substring(0, this.Text.Length - 1);
            this.SelectionStart = this.Text.Length + 1;
            e.Handled = true;
        }
    }
}

The code does work as it is supposed to but the browser still goes back one page even after e.Handled is set to be true.
Can anyone help me with this? I feel like I have been to all forums where they discuss this, and still haven't found an answer
Thanks for your help guys!

A: 

Generally when this happens it means the extension did not implement IInputObject correctly. I'm not familiar with the SpicIE framework, so I'm not sure if you need to implement it or they do.

jeffamaphone
yeah, IInputObject is implemented by SpicIE framework
GotAmye