Try this out...
protected override bool ProcessTabKey(bool forward)
{
Control curControl = this.ActiveControl;
if (curControl != null)
{
this.SelectNextControl(cur
curControl = this.ActiveControl;
if (typeof(TabControl) == curControl.GetType())
{
TabControl tc = (TabControl)curControl;
int index = tc.TabPages.IndexOf(tc.Sel
if (forward)
{
if (index < (tc.TabPages.Count - 1))
tc.SelectTab(++index);
else
tc.SelectTab(0);
}
else
{
if (index > 0)
tc.SelectTab(--index);
else
tc.SelectTab(tc.TabPages.C
}
}
}
return false;
}
Main Topics
Browse All Topics





by: krbatgePosted on 2006-01-17 at 00:42:49ID: 15717850
Hi FVDW,
The tabbing behaviour of Tab controls is slightly different, but you can still switch tabs without needing to use the mouse. After tabbing through all items on the tab, the next press of the TAB button will set focus to the current tab label. Now you can use the left and right arrow keys to select a different tab.
Cheers!