U
Udi
Hi All,
MyRichEdit is derived from RichTextBox.
I'm overriding OnKeyDown.
I'm trying to handle the TAB key but without printing it in the edit
box:
protected override bool IsInputKey(Keys keyData)
{
switch (keyData)
{
case Keys.Tab:
case Keys.Up:
case Keys.Down:
case Keys.Left:
case Keys.Right:
{
return true;
}
}
return base.IsInputKey(keyData);
}
protected override void OnKeyDown(KeyEventArgs e)
{
switch (e.KeyData)
{
case Keys.Tab:
{
e.Handled = OnTabPressed();
break;
}
:
:
}
base.OnKeyDown (e);
}
OnabPressed() returns false, but the TAB is still printed in
MyRichEdit.
What am I missing?
I'm using VS2003, XP SP1
Thanks!
MyRichEdit is derived from RichTextBox.
I'm overriding OnKeyDown.
I'm trying to handle the TAB key but without printing it in the edit
box:
protected override bool IsInputKey(Keys keyData)
{
switch (keyData)
{
case Keys.Tab:
case Keys.Up:
case Keys.Down:
case Keys.Left:
case Keys.Right:
{
return true;
}
}
return base.IsInputKey(keyData);
}
protected override void OnKeyDown(KeyEventArgs e)
{
switch (e.KeyData)
{
case Keys.Tab:
{
e.Handled = OnTabPressed();
break;
}
:
:
}
base.OnKeyDown (e);
}
OnabPressed() returns false, but the TAB is still printed in
MyRichEdit.
What am I missing?
I'm using VS2003, XP SP1
Thanks!