CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Nov 2000
    Posts
    57

    How to refer to controls on a tab strip of a tabcontrol

    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.


  2. #2
    Join Date
    Mar 1999
    Location
    Nepal
    Posts
    540

    Re: How to refer to controls on a tab strip of a tabcontrol

    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.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured