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 > Centering NSDrawer?

Centering NSDrawer?
Thread Tools
Grizzled Veteran
Join Date: Jun 2002
Status: Offline
Reply With Quote
Apr 17, 2003, 07:40 AM
 
Im creating a drawer that needs to go at the bottom of the app. But I never seem to be able to change the height of it, and it always is stuck to the far left. How can I align the drawer centered and change its height? Whenever I change the height it goes to something like 300.
     
Senior User
Join Date: Dec 2001
Status: Offline
Reply With Quote
Apr 17, 2003, 08:13 PM
 
The methods you want are setLeadingOffset: and setTrailingOffset: You'll have to recalculate these on the fly if your window is resizable. As for the draw jumping to 300 pixels high, you want set the minContentSize to less than that before actually changing the contentSize.
"Think Different. Like The Rest Of Us."

iBook G4/1.2GHz | 1.25GB | 60GB | Mac OS X 10.4.2
Athlon XP 2500+/1.83GHz | 1GB PC3200 | 120GB | Windows XP
     
Mac Elite
Join Date: Sep 2000
Location: Norfolk, Va
Status: Offline
Reply With Quote
Apr 18, 2003, 02:09 PM
 
Actually, I think in IB most of that is automatically reconfigured, and you can set the initial behavior in the inspector.
If you aren't using IB, nm
you are not your signature
     
   
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 03:24 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