Sign in to follow this  

Creating a UI: Tabs - Help? Suggestions?

This topic is 3592 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I'm starting to create my own UI system, and am curious as to how to accomplish a tabbed system such as used, by alfith, using direct3d/C++. Example: http://members.gamedev.net/alfith/imagesDDream/alfEdit_006.jpg I've had success doing texboxes, listboxes, check boxes, radio, labels, buttons. Anyone have any tutorials or sample code how to produce such a tab control? I asked alfith, but he is using GTK, from what he told me. I do appreciate any insight anyone can provide me. Thank you~ Quinn

Share this post


Link to post
Share on other sites
Well, it seems easy to me. The tabs are just buttons which hide and show child widgets. Each of those child widgets has the same size, and each contains different controls. So assuming your interface system supports multiple levels of children and parents, you should be able to pull this off pretty easily.

Share this post


Link to post
Share on other sites
So, in turn, so I would just have multiple instances of listboxes, just making the one prompted by the button press visble? or a singlelistbox that populates everything, for each button? - is one option more phesible than the other?

Share this post


Link to post
Share on other sites
It wouldn't really make sense to have a single list box that changes its contents. Presumably, you want a tab control that you can display anything on. Have a tab page control, which contains other controls. The tab control will have a list of these, as well as a pointer to the currently active one. Whenever a tab button is changed, the current tab page is hidden, and the new tab page is shown, along with all of its controls.

Share this post


Link to post
Share on other sites
Yeah, I don't think I was thinking when I posted that comment. I am beginning to understand it a lot better. Once I get to coding it, I'll come back and bug people about it more, for the sake of optimization, etc.

Once again, thanks everyone for the help.

Share this post


Link to post
Share on other sites

This topic is 3592 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this