Groups | Blog | Home
all groups > dotnet windows forms > february 2008 >

dotnet windows forms : Tabcontrol focus


Arne Garvander
2/13/2008 11:10:02 AM
I would like to connect a tabpage on a tabcontrol with a function key.
I know how to capture a function key. I can programmatically find my
selected tabpage.
Mytabpage.focus does not seem to do anything.
Do I need to create a tabpage click event?

--
Arne Garvander
Certified Geek
Arne Garvander
2/13/2008 1:55:02 PM
I tried
MyTabControl.SelectedTab.name = "F4"
when I had a tabpage named "F4", but nothing happened.
Next time I pressed F4 my selectedTab hade the name "F4", but the original
tabpage is still visible. (Maybe i just renamed my original tabpage with my
new code)
--
Arne Garvander
Certified Geek
Professional Data Dude


[quoted text, click to view]
Erik Haverkamp
2/13/2008 10:23:20 PM
Just use tabControl.SelectedTab = [tabname]
And the tabpage will be activated

"Arne Garvander" <ArneGarvander@discussions.microsoft.com> schreef in
bericht news:471388E6-D46C-4C6A-870C-C82B015499C1@microsoft.com...
[quoted text, click to view]
Erik Haverkamp
2/14/2008 8:57:49 AM
Hi Arne,

Change MyTabControl.SelectedTab.name = "F4"
into MyTabControl.SelectedTab = "F4"

And things should work fine.

Erik

"Arne Garvander" <ArneGarvander@discussions.microsoft.com> schreef in
bericht news:16F871B9-6E00-466A-A43F-F2411863970B@microsoft.com...
[quoted text, click to view]
Ravi Bhavnani
2/17/2008 12:34:47 PM
Any of these should work:

MyTabControl.SelectedTab = MyTabPage;
MyTabControl SelectTab (MyTabPage);

Hope this helps,

/ravi

------------------
[quoted text, click to view]

AddThis Social Bookmark Button