Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > Toggle Drawer with Tabs in TabView

Toggle Drawer with Tabs in TabView
Thread Tools
Senior User
Join Date: Nov 2003
Location: Middle of the street
Status: Offline
Reply With Quote
Mar 6, 2004, 05:13 PM
 
Can anyone tell me how I can open the NSDrawer by simply clicking on a Tab in the NSTabView?

I have a window with multiple Tabs on them and some of the preferences on one of the tabs need to be in a NSDrawer; but I don't want to add an addition button to toggle the Drawer. Instead I want the Drawer to open when the user moves to the Tab that has additional preferences in the Drawer.

Thanks.
     
Addicted to MacNN
Join Date: Nov 2002
Location: Seattle, WA
Status: Offline
Reply With Quote
Mar 6, 2004, 05:23 PM
 
NSTabView has a Delegate method that gets called when the tab view changes. I forget what it's called but in that method your tab view's delegate can open the drawer
     
Mac Enthusiast
Join Date: Mar 2003
Location: Atlanta, GA
Status: Offline
Reply With Quote
Mar 6, 2004, 05:42 PM
 
I believe the delegate is:

Code:
- (void)tabView:(NSTabView *)tabView didSelectTabViewItem:(NSTabViewItem *)tabViewItem
So I believe the code would look like:

Code:
- (void)tabView:(NSTabView *)myTabView didSelectTabViewItem:(NSTabViewItem *)myTabViewItem { [myDrawer open]; }
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 09:00 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2