By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
426,222 Members | 1,123 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 426,222 IT Pros & Developers. It's quick & easy.

Tab Control Problem

P: 24
Thought that this would be an easy thing to do but apparantly not....
I have a tab control on my form with about 5 different tabs (pages). On one of these tabs I tried to place another tab control. Instead, the 2nd tab control overlays the entire page ranges of the 1st tab control i.e. it is not embedded into a singe tab of the 1st control.

Does this make sense and apart from using visibility true/false for the second tab when the page is selected, is there a way to embed 1 tab control into a single page of another?
Feb 25 '09 #1
Share this Question
Share on Google+
3 Replies

Expert 2.5K+
P: 3,532
No, this can't be done directly. You can't place a Tab Control on a Tab Control! But you can place a Subform on the Page of a Tab Control, with the Form used as the basis of the Subform having a Tab Control on it.

But I have to tell you that this complicated a scenario makes one think that your overall design is awfully "busy" and may need re-thinking. Exactly what are you doing here?

Linq ;0)>
Feb 25 '09 #2

P: 675
Sometimes I have tab controls where most of the pages are fine, but one has too many controls to fit easily. I paste pictures of birds from several sites, and want certain identifying information. Photographer, date, location, species, common name, etc. One tab of my options tab control might be "Warn if...", and all the warning checkboxes don't fit. Checkboxes labeled "Warn if photographer name missing", "Warn if date missing", ... Easily sub-tabbed on another tab control. Here's how:
Expand|Select|Wrap|Line Numbers
  1. Private Sub tabMain_Change()
  2.     If tabMain.Pages(tabMain.Value).Name = "Page3" Then
  3.         tabSub.Visible = True
  4.     Else
  5.         tabSub.Visible = False
  6.     End If
  7. End Sub
For this example, I have TabControl = tabMain and 3 tabs, Page1, Page2, & Page3. I create another TabControl = tabSub. Yes, it appears to be on all pages of TabMain, because it isn't a part of tabMain at all. It is a control on my form, but it "Shows through" tabMain, and appears to be a control on a page (or all pages now). By making it Visible only when the proper tab page is active, it acts as if it is a sub-tab control.
You have already done the form design. Change my tab control name to yours, and it should work.
Feb 26 '09 #3

P: 24
Cheers for the info.
I was just wondering if it was possible but I guess not. I have gone for the tab control on a subform approach.

The form I am using is really busy but this was the best way of dealing with what the user sees (after much thinking about the problem).

The main form is a utilities form where users can perform many different tasks with the table data. Just on one of the tabs, they needed to see a lot of information which is best handled ny list boxes on each of the tabs.
Feb 26 '09 #4

Post your reply

Sign in to post your reply or Sign up for a free account.