By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,656 Members | 1,327 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,656 IT Pros & Developers. It's quick & easy.

Tabcontrol and Listview behave...

P: n/a
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!
Nov 16 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
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
Nov 16 '05 #2

P: n/a
Thank you Marcin!

It solved my problem.... You saved my day!!! :D

// Andreas

"Marcin Grzębski" wrote:
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

Nov 16 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.