Click to See Complete Forum and Search --> : How to refer to controls on a tab strip of a tabcontrol


Ali Habib
March 21st, 2001, 05:59 AM
How can we reference controls on a given tab strip of a tabcontrol. Incase of form we have a controls collection, is there a controls collection for each tab strip? Please let me know how can I access controls on different tab strips of a tab control.

shree
March 21st, 2001, 06:20 AM
The controls in the tabstrip are also in the controls collection of the form, and there is no property that distinguishes whether the control lies on the form or on the tabstrip. However, if you have to distinguish them, then you can use the tag property.

The tag property is present in every control. So, if you set it to "tt" for controls on the tabstrip and leave it blank for others on the form then, later, while looping through the form.controls collection with a for...each statement, you can check the tag property and determine where it lies.