TabPage Control OnClick Event

F

Fred Chateau

I am trying to run code that binds a DataGridView control on a TabPage. I
inserted the code in the TabPage_Click event, but when the tab is clicked,
the event never fires.

I understand it is necessary to set the StandardClick style to enabled. I
can't seem to find a StandardClick style on the TabControl, but I used the
following code in the Form_Load event.

this.SetStyle(ControlStyles.StandardClick, true);
this.UpdateStyles();

Still no click event...

Am I doing something wrong?
 
A

Ashot Geodakov

The parent TabControl has a few events that you can handle:

Selecting()
SelectedIndexChanged()
Selected()
 

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