TabControl

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
 
P

Peter Foot [MVP]

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top