Go Back   MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Reply
 
Thread Tools Search this Thread Display Modes
Old Jun 20, 2013, 03:53 PM   #1
cpuin
macrumors member
 
Join Date: Feb 2013
ToolBar to change pannels

I created a simple app with NSToolbar.
I've made 3 icons binded to a method which must change the content of the main window:

Code:
- (IBAction) setPanel:(id)sender
{
    if ([sender tag]==0)
    {
        //set new document pannel
    }
    else if ([sender tag]==1)
    {
        //set new documents pannel
    }
    else if ([sender tag]==2)
    {
        //set new settings pannel
    }
        
}
My question is how to change the current content of the window with one from another xib file?
cpuin is offline   0 Reply With Quote
Old Jun 20, 2013, 04:16 PM   #2
chown33
macrumors 603
 
Join Date: Aug 2009
Put an NSTabView in your window. Give it one of the NSTabViewTypes that start with "NSNoTabs". Clicking a toolbar icon changes the tab index.


https://developer.apple.com/library/.../uid/10000074i
chown33 is offline   0 Reply With Quote
Old Jul 5, 2013, 07:35 AM   #3
cpuin
Thread Starter
macrumors member
 
Join Date: Feb 2013
Quote:
Originally Posted by chown33 View Post
Put an NSTabView in your window. Give it one of the NSTabViewTypes that start with "NSNoTabs". Clicking a toolbar icon changes the tab index.


https://developer.apple.com/library/.../uid/10000074i
Thanks a lot.Unfortunately i can't find how to make it using xib files for the different tabs.I don't know how to make NSView to init with XIB.
cpuin is offline   0 Reply With Quote

Reply
MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Tags
switch pane, toolbar

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Similar Threads
thread Thread Starter Forum Replies Last Post
Customizing Toolbar chattahoochee Mac Basics and Help 9 Feb 13, 2014 10:43 AM
Items in Toolbar lukestrohbehn OS X 10.8 Mountain Lion 2 May 13, 2013 08:36 AM
Resolved: Theming Finder Toolbar 1theo0 OS X 1 Oct 28, 2012 06:36 AM
How to change toolbar buttons? ChrisPearBookę OS X 5 Jun 26, 2012 04:28 PM

Forum Jump

All times are GMT -5. The time now is 03:14 PM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Copyright 2002-2013, MacRumors.com, LLC