Easy: On Click for Tab Controls

  • Thread starter Thread starter Jimmy
  • Start date Start date
J

Jimmy

Hello,

Thank you for helping.

When my users click on a new tab (page) in a tab control,
I need to run some code. However, I cannot get the "On
Click" event for the page to fire when I hit the tab
itself. It only fires when I click on the page itself
(not the page's tab).

Does anyone have any ideas?

Thanks,

Jim
 
Jimmy said:
Hello,

Thank you for helping.

When my users click on a new tab (page) in a tab control,
I need to run some code. However, I cannot get the "On
Click" event for the page to fire when I hit the tab
itself. It only fires when I click on the page itself
(not the page's tab).

Common question. You need to use the Change event of the entire
TabControl, not an event for a specific page. If you only want the code to
run when a particular page is selected you can test the Value property of
the TabControl. It corresponds to the index value of the current page.
 
Back
Top