TabControl

  • Thread starter Thread starter Ron Harter
  • Start date Start date
R

Ron Harter

I am porting a desktop application to the IPaq and having some trouble with
the TabControl

On the desktop when the user selected a tab I reparented the controls that
were on the previous tab with the following code:

tabControl1.SelectedTab.Controls.AddRange(new Control[]{groupBox1,
groupBox2});

Since the .Net Compact Framework doesn't support the SelectedTab, How would
I reparent the controls?

Thanks
 
You can use the SelectedIndex e.g.

tabControl1.TabPages[tabControl1.SelectedIndex].Controls.Add(groupBox1);

You'll have to add them individually as AddRange isn't available in .NETCF

Peter
 
Back
Top