Results 1 to 4 of 4

Thread: Get Children

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Jan 2008
    Posts
    284

    Get Children

    How do you get the children of a panel?
    I am still very new to VB.NET, so I have MANY questions

  2. #2
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: Get Children

    Every control has a Controls collection. Just as you get the controls on a form from the form's Controls collection, you get the controls on a Panel from the Panel's Controls collection.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  3. #3

    Thread Starter
    Hyperactive Member
    Join Date
    Jan 2008
    Posts
    284

    Re: Get Children

    My panel has picture boxes in it, which are dynamically added to the panel... How do you get those?
    I am still very new to VB.NET, so I have MANY questions

  4. #4
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: Get Children

    Exactly how I just told you: from the Controls collection. If the Panel contains other controls too then it might be easier to maintain a separate List(Of PictureBox). That way you can just loop through that and you'll know that you'll get the PictureBoxes, all the PictureBoxes and nothing but the PictureBoxes.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

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