Results 1 to 4 of 4

Thread: [RESOLVED] [2005] Adding duplicate Dynamically created controls

  1. #1

    Thread Starter
    Frenzied Member stimbo's Avatar
    Join Date
    Jun 2006
    Location
    UK
    Posts
    1,739

    Resolved [RESOLVED] [2005] Adding duplicate Dynamically created controls

    Hi folks, I've got a tab control, and on tab1 I have a flowpanel. I retrieve data from a database and create my controls (pictureboxes) based on data returned and add them to the flowpanel. This works fine.

    I have another tab where I want to add the same pictureboxes but it wont work. I was hoping that I could simply add them when they are being generated to both flow panels. I tried creating a new picbox and copying the existing picbox and adding it but nothing I try is working.

    Is there a simple solution?

    Thanks
    Stim

    Free VB.NET Book Chapter
    Visual Basic 2005 Cookbook Sample Chapter

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

    Re: [2005] Adding duplicate Dynamically created controls

    You can't have one control in two places at once. You'd have to create two PictureBoxes, although you can display the same Image in both.
    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
    Fanatic Member
    Join Date
    Feb 2007
    Location
    Eindhoven
    Posts
    828

    Re: [2005] Adding duplicate Dynamically created controls

    can you post the code that u r using?

  4. #4

    Thread Starter
    Frenzied Member stimbo's Avatar
    Join Date
    Jun 2006
    Location
    UK
    Posts
    1,739

    Re: [2005] Adding duplicate Dynamically created controls

    Ah, I thought that might be the most likely issue. i'll just work round it.

    Thanks,
    Stim

    Free VB.NET Book Chapter
    Visual Basic 2005 Cookbook Sample Chapter

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