TabPage OnClick
-
This must have a really easy answer. I have created a tabcontrol and added five pages to it. I added an 'click' event handler to each page. But the event only fires when I click on the main part of the page, not on the tabs (labels) themselves! (The graphical representation of the tabs changes with each click, but my Click handler is never called). Since most of each page is covered with other controls this makes it almost impossible to use. What am I doing wrong? Is there a different click event for the labels?
-
This must have a really easy answer. I have created a tabcontrol and added five pages to it. I added an 'click' event handler to each page. But the event only fires when I click on the main part of the page, not on the tabs (labels) themselves! (The graphical representation of the tabs changes with each click, but my Click handler is never called). Since most of each page is covered with other controls this makes it almost impossible to use. What am I doing wrong? Is there a different click event for the labels?
The
TabPage
does not include the tab itself; that is painted and otherwise handled by theTabControl
. With that in mind and looking at theTabControl
events, you should notice theSelectedIndexChanged
event. This posting is provided "AS IS" with no warranties, and confers no rights. Software Design Engineer Developer Division Sustained Engineering Microsoft [My Articles] [My Blog]