Tabcontrol focus

  • Thread starter Thread starter Arne Garvander
  • Start date Start date
A

Arne Garvander

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?
 
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


Erik Haverkamp said:
Just use tabControl.SelectedTab = [tabname]
And the tabpage will be activated
 
Hi Arne,

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

And things should work fine.

Erik

Arne Garvander said:
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


Erik Haverkamp said:
Just use tabControl.SelectedTab = [tabname]
And the tabpage will be activated

Arne Garvander said:
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?
 
Any of these should work:

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

Hope this helps,

/ravi
 
Back
Top