Linking F1 help to a tab

Docking/MDI for Windows Forms Forum

Posted 17 years ago by Rosie Chandler
Version: 2.0.77
Avatar
I'm trying to link up F1 help to an Actipro TabStrip control by handling the KeyDown event. I've selected the TapStripPage and double clicked on the KeyDown event in the list and added the following code to the event:

private void pgeButton_KeyDown(object sender, KeyEventArgs e)
{
if (e.KeyCode == Keys.F1)
{
// Code to display help info in a webbrowser control
}
}

When the program runs, pressing F1 while the tab has focus (i.e. after I've just clicked on it) does absolutely nothing. Infact, I can't even get the program to do something simple like display a message box. Am I doing something wrong?

Comments (1)

Posted 17 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Hi Rosie,

I believe KeyDown only fires on a control if it has focus. Since the TabStrip doesn't really get focus (its child controls do), that probably won't work. Try using something like an override of ProcessCmdKey. You would have to create your own TabStrip class that inherits ours to do this. But that might work out better for you because I believe that does "bubble" the event up.


Actipro Software Support

The latest build of this product (v24.1.0) was released 3 months ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.