How do I place all of my UI elements to be subviews of another view/window?
Right now I have a bunch of labels/buttons in the Interface builder - what's the best way to make another "screen" in the IB and convert to it? Should I add these my UI pieces onto a view/window and then create a new view? But the IB gets messy pretty quick. Is there a way to have multiple screens and switch between them?
You can do it all in IB using an NSTabView. If you want the tabs to be invisible, you can set its style to hidden (or something) and then connect buttons to its actions for next and previous tab. You can probably bind the buttons' enabled state to the tab view too. Or you can tell the tab view to change tab with code.
There are plenty of other ways to achieve the same effect with code, most of which use the addSubview: method of NSView. That would let you have multiple XIB files if you'd prefer to work that way.
There are plenty of other ways to achieve the same effect with code, most of which use the addSubview: method of NSView. That would let you have multiple XIB files if you'd prefer to work that way.
I made a Tab Bar Controller and got "Item1" to load "Game1ViewController.nib" by setting its NIB NAme in Attributes. Back in Game1ViewController.nib, my main view, how do I connect a button to the next/previous tabs? I found "goForward" and "goBack" if I dragged it to First Responder but that didn't seem to do anything.
Do I have to write events for changing the tabs? (Also, how do I have more than 2?)
Do I have to write events for changing the tabs? (Also, how do I have more than 2?)
Possibly Related Threads...
| Thread: | Author | Replies: | Views: | Last Post | |
| multiple nsopengl subviews problem | NelsonMandella | 0 | 1,824 |
Nov 9, 2009 09:44 PM Last Post: NelsonMandella |
|
| When to create custom OpenGL view instead of subclass NSOpenGL view | Coyote | 37 | 16,876 |
Oct 20, 2009 08:16 PM Last Post: Coyote |
|
| Printing OpenGL View in Window | skyhawk | 3 | 3,281 |
Mar 21, 2007 02:05 PM Last Post: unknown |
|
| Copying from OpenGL window to other window | Ingemar | 7 | 4,063 |
Nov 4, 2006 03:50 AM Last Post: OneSadCookie |
|
| Problem with overlapping micro-elements | whabilly | 6 | 3,199 |
Jan 3, 2006 01:37 AM Last Post: OneSadCookie |
|

