PDA

View Full Version : NSDrawer Problem


dadidoe
March 23rd, 2009, 01:29 PM
Hi,

I've got a NSDrawer, but I ran into 2 problems. The first one is that the drawers size is too small, can someone give me a snippet i can use?

Secondly, how can the NSDrawer AutoOpen when the app launches?

thanks

ElDiabloConCaca
March 23rd, 2009, 01:58 PM
http://developer.apple.com/DOCUMENTATION/Cocoa/Reference/ApplicationKit/Classes/NSDrawer_Class/Reference/Reference.html

Specifically, "initWithContentSize:preferredEdge":

http://developer.apple.com/DOCUMENTATION/Cocoa/Reference/ApplicationKit/Classes/NSDrawer_Class/Reference/Reference.html#//apple_ref/occ/instm/NSDrawer/initWithContentSize:preferredEdge:

You should just be able to call the "open" method on the drawer as one of the first things your app does after launching and after initializing its main window, no?

http://developer.apple.com/DOCUMENTATION/Cocoa/Reference/ApplicationKit/Classes/NSDrawer_Class/Reference/Reference.html#//apple_ref/occ/instm/NSDrawer/open