Results 1 to 7 of 7

Thread: [Resolved] [2.0] Multi tab at run time

Threaded View

  1. #1

    Thread Starter
    Fanatic Member Bombdrop's Avatar
    Join Date
    Apr 2001
    Location
    St Helens, England, UK
    Posts
    667

    Resolved [Resolved] [2.0] Multi tab at run time

    Hi all I' working on an app that will show contact info of clients, the problem arrises is that some clients have have more than one contact.

    I decided the best way to sho the data would be via a tabcontrol which statrs of with one tabpage with 2 text boxes and 2 lables. holding contact name and address. now if there is more than one contact i would then do the following

    Code:
    TabPage tab  ;
    foreach(Control C in tabPage1.Controls){
    				MessageBox.Show(C.Name.ToString());
    			}
    			
    			
    tab =  this.tabPage1;
    			
    foreach(Control C in tab.Controls){
    			MessageBox.Show(C.Name.ToString());
    			}
    			
    tabControl1.TabPages.Add(tab);
    this does add the new tab and the for each says it contains the controls and I get no errors but the controls are not visable. I beleive it's due to the fact the names of the controls on the newly add tab conflict with the previous control names.

    Can anyone please help me achive my goal of add idetincle tabspages to a tab control at run time.

    Many thanks

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