Hi Richard,
Thanks for your post.
Based on my experience and research, an accelerator key can only be mapped
to a control, other controls with the same accelerator will not take
effect. To work around this problem, I suggest that you can dynamically
chage the Text of the controls. Please refer to the following code snippet:
//-------------code snippet--------------------
private void tabControl1_SelectedIndexChanged(object sender,
System.EventArgs e)
{
if(this.tabControl1.SelectedTab.Text == "Tab1")
{
this.button1.Text = "&Button1";
this.button2.Text = "Button2";
}
else
{
this.button1.Text = "Button1";
this.button2.Text = "&Button2";
}
}
//---------------end of----------------------------
Hope this helps.
Regards,
HuangTM
Microsoft Online Partner Support
MCSE/MCSD
Get Secure! ¨C
www.microsoft.com/security
This posting is provided ¡°as is¡± with no warranties and confers no rights.