Skip to main content
gamedev.net
🔒 Locked

VB: Tabstrips

Started by doctorsixstring 5 replies 500+ views
Original Post
doctorsixstring
doctorsixstring
I have a TabStrip control set up in my "MainWindow" form. I want to be able to use the tab control to switch between a set of seven "child" forms which appear within the tab control. All the tutorials I have seen concerning TabStrips (of which there are few) only talk about using frames to group controls onto a tabstrip. Unfortunately, I''d rather not use frames. Thanks in advance, Mike
doctorsixstring
doctorsixstring
This can''t be that difficult. Do I need to clarify anything that I posted?

-Mike
doctorsixstring
doctorsixstring
I want to make an SDI application. Basically, I want to make a game editor that can modify every aspect of my game, including the following:

The Galactic Map
Sentient Races
Factions
Starship Designs
Characters
etc.

For each different part of the game, such as the galactic map, I will have a tab. Thus, each "page" of the TabStrip control will contain edit boxes, check boxes, etc. that I can use to modify the details of the game.

In C++, I simply created a set of dialog boxes and set the dialog box for the current tab index as a child of the tab control. Thus, selecting any given tab would bring up the corresponding child window.

I am very new to VB, but I have been programming in C++ for years. I want to try using VB for my game editor because it seems like it will shave weeks off the development time. I already have parts of the editor done in C++, but it takes many hours in VC++ to do the same thing that might only take a few minutes in VB.

I think that just about covers what I want to do. Basically, I just need a good explanation of using a tab control in VB.

Mike
Waverider
Waverider
If you have Service Pack 4 for Visual Studio installed (assuming you are using 6.0), select Microsoft Tabbed Dialog Control 6.0(SP4) in the Components list. It's a lot easier to work with.


[edited by - Waverider on January 24, 2003 6:11:56 PM]
It's not what you're taught, it's what you learn.
Sand_Hawk
Sand_Hawk
I once did this in VB. I don''t know everything from the top of my brains because it is over a year I did it. But idea is very simple. The tabstrip triggers a message when you click on another tab. That''s all. So, you design all the controls you want to be inside a groupbox. If you have 4 tab strips, there will be 4 group boxes.

Each groupbox should have the same size and they should overlap eachother. Standard you will have to set 1 of the groupboxes to be front, either in code, or in the design window(Do it in code, that is easier for when you move on of the groupboxes forward for editing). When you click one of the other strips, the message for the strip is triggered, you check which message number it is, and make that groupbox visible and the one currently visible is made invisible.

I hope I helped you,

Sand Hawk

----------------
-Earth is 98% full. Please delete anybody you can.


My Site
----------------(Inspired by Pouya)

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.