Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Check if a specific tab page is selected (active)

I am making an event to check if specific tab page in a tab control is active.

The point is, it will trigger an event if that tab page in a tab control is the currently selected tab. Any code that will give me what I need?

like image 624
Naufal Fikri Avatar asked Dec 28 '11 07:12

Naufal Fikri


People also ask

What is selected tab?

The Selection tab allows you to select which values should be included in the log. The window below corresponds to the following circuit. The tab is divided into three vertical areas. The first (leftmost) is a list of all components in the circuit whose values can be logged.


1 Answers

Assuming you are looking out in Winform, there is a SelectedIndexChanged event for the tab

Now in it you could check for your specific tab and proceed with the logic

private void tab1_SelectedIndexChanged(object sender, EventArgs e) {      if (tab1.SelectedTab == tab1.TabPages["tabname"])//your specific tabname      {          // your stuff      } } 
like image 132
V4Vendetta Avatar answered Oct 11 '22 06:10

V4Vendetta