PC Review
Forums
Newsgroups
Microsoft DotNet
Microsoft Dot NET Compact Framework
Re: Setting focus for TabControl
Forums
Newsgroups
Microsoft DotNet
Microsoft Dot NET Compact Framework
Re: Setting focus for TabControl
![]() |
Re: Setting focus for TabControl |
|
|
Thread Tools | Rate Thread |
|
|
#1 |
|
Guest
Posts: n/a
|
Set the control's SelectedIndex property.
-- Chris Tacke OpenNETCF Consulting Managed Code in the Embedded World www.opennetcf.com -- "Narasimham" <Narasimham@discussions.microsoft.com> wrote in message news:8BE29A32-64A5-4393-A556-E07915CB1A53@microsoft.com... > Hi, > > I have a TabControl in my Windows Mobile 5.0 application running .NET CF > 2.0. I have a requirement that needs to be able to switch between tab > pages > using hot keys. Does any one have any idea how this can be achieved. > > I have written a simple function to test the functionality of actually > switching the tabs programatically by calling a function. But it does not > seem to work. > > Sample piece of code is below: > > if (String.Compare(e.KeyChar.ToString(), Keys.F.ToString(), > true) == 0) > { > //findTabPage.Show(); > //findTabPage.Focus(); > //findTabPage.Update(); > //((TabFindItemPanel)findTabPage.Controls[0]).Show(); > > //tabControl.Controls[tabControl.Controls.IndexOf(findTabPage)].Show(); > > tabControl.TabPages[tabControl.Controls.IndexOf(findTabPage)].Focus(); > > tabControl.TabPages[tabControl.Controls.IndexOf(findTabPage)].Show(); > } > > findTabPage is a TabPage inside tabControl. > > The commented lines are things i tried and not working. So I tried various > different routes. > > Thanks, > Narasimham |
|
![]() |
|
| Thread Tools | |
| Rate This Thread | |
|
|

Main Page 

