Tabcontrol and Listview behave...

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello
I am using a TabControl wich includes a ListView on each TabPage. On the
click event I use the text on each tab to fill the ListView with data. When
the user click on a TabPage a use the Validating event to validate the data
in the ListView.

Now to the problem, it seems that after the Validating event, the TabPage:s
focus will change, the clicked TabPage will be active but the problem is that
the Click event will not be fired. Why???

Is there anybody who have a solution to this??
Is there any event I can use to fire the click event on my on?? How will I
then now whitch page was clicket??

Many tanks!
 
Hi Andreas,
Hello
I am using a TabControl wich includes a ListView on each TabPage. On the
click event I use the text on each tab to fill the ListView with data. When
the user click on a TabPage a use the Validating event to validate the data
in the ListView.

Now to the problem, it seems that after the Validating event, the TabPage:s
focus will change, the clicked TabPage will be active but the problem is that
the Click event will not be fired. Why???

Is there anybody who have a solution to this??
Is there any event I can use to fire the click event on my on?? How will I
then now whitch page was clicket??

Look in .NET docs for TabControl class.
There is an event: SelectedIndexChanged.
and a property: SelectedIndex.

Handle that "event" and check the "property" to get what you want...
or i missed something.

HTH & Cheers!
Marcin
 
Back
Top