Tab page question

D

Darin

I have a tabcontrol with 2 pages on it. On the first page, I have some
labels. I want it when the label is clicked, to load some data on the
second tab and have that tab be the one with focus. The first part is
fine (the data on the second tab is loaded based off the label clicked
on the first page), but I cannot get the second tab page to come to the
front. I have tried:

tbWeek.focus
tbWeek.select
tbweek.show
tbweek.bringtofront

None seem to work. Any suggesstions?

Darin
 
A

Armin Zingler

Darin said:
I have a tabcontrol with 2 pages on it. On the first page, I have
some labels. I want it when the label is clicked, to load some data
on the second tab and have that tab be the one with focus. The first
part is fine (the data on the second tab is loaded based off the
label clicked on the first page), but I cannot get the second tab
page to come to the front. I have tried:

tbWeek.focus
tbWeek.select
tbweek.show
tbweek.bringtofront

None seem to work. Any suggesstions?

tabcontrol1.selectedtab = tbWeek
 
H

Herfried K. Wagner [MVP]

* Darin said:
I have a tabcontrol with 2 pages on it. On the first page, I have some
labels. I want it when the label is clicked, to load some data on the
second tab and have that tab be the one with focus. The first part is
fine (the data on the second tab is loaded based off the label clicked
on the first page), but I cannot get the second tab page to come to the
front. I have tried:

\\\
Me.TabControl1.SelectedTab = Me.TabPage1
///

- or -

\\\
Me.TabControl1.SelectedIndex = 1
///
 
D

Darin

Thank you Armin. I was focused on the tab page itself and not on the
entire control.

Darin
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top