Re: growing an NSView?
Re: growing an NSView?
- Subject: Re: growing an NSView?
- From: Lamar Williams <email@hidden>
- Date: Wed, 7 Nov 2001 21:37:22 -0800
I don't think it's a drawers. Drawers physically look like a separate
window, what I'm talking about looks like the same window just got
bigger.
mac
On Wednesday, November 7, 2001, at 04:27 PM, Brendan Younger wrote:
On Wednesday, November 7, 2001, at 06:12 PM, email@hidden wrote:
I would like to have an arrow at the bottom of my window such that
when pressed will point down and the window will extend, and I can put
a text view within the extend part. I've seen this in many
applications. How do they do this? Do they extend the view? Do
they create another view below the current view?
What you are looking for is called NSDrawer. There is a decent
tutorial on www.cocoadevcentral.com called "How to Use Drawers". Also,
there's some sample code called DrawerMadness on Apple's site
(developer.apple.com/samplecode/). And one final thing: be wary of
adding a non-standard UI element. Chances are, anything designed by
you isn't going to be nearly as good-looking or intuitive to use as
what Apple has declared the standard (if for no other reason than it is
the standard). Try to use a toolbar item or a standard button
something else that you see a lot of other applications using. (That
and check out the Aqua User Interface Guidelines for the final word.)
Brendan Younger