How to determine which TabControl Sheet is currently in viewer

  • Thread starter Thread starter Diomtus
  • Start date Start date
D

Diomtus

Guest
I am using TabControl Design in Windows Forms (visual studio 2013). The one thing each tab sheet has in common is that they hold/display records of information. What is different about each sheet is that the information in the records requires specific organization/formating in order to be read and processed correctly. I am setting up 8 buttons (ie, add, delete, insert, etc.) However, since i don't know how to determine which tab is opened in the viewer, I have to put a set of 8 buttons in each individual tab sheet, which currently means 64 buttons (8 tabs with 8 buttons each).


I having been attempting to discover a way to use code to determine which tab is currently being viewed/active/opened so that i can place the 8 buttons on the main form (outside the area of the sheet tabs, so that when the Add Button (for example)is pressed, it can identify the record type by the current tab view so it can employ the correct sub routine so as to properly process the information in its specified format.


If there is code that requires a "query" for which tab is opened after the press of a button, then I can easily work with that, that would be awesome! But it would be even cooler if their was a way to trigger an event of some sort when changing from one tab to another, hence identifying the current tab view the moment it changes. If at all possible, I would greatly appreciate responses with both code sets.


 


Thank You, Blain (aka Diomtus)


 

Continue reading...
 
Back
Top