Re: Hiding and showing a window
Re: Hiding and showing a window
- Subject: Re: Hiding and showing a window
- From: David Remahl <email@hidden>
- Date: Sat, 16 Feb 2002 23:45:04 +0100
>
Greetings,
>
>
I have a faceless application which needs to pop up a small display
>
window at certain events. Preferably, the window will slide out from
>
under the menu bar.
>
>
I have managed to make a window with a transparent background, which
>
floats above all else. However, I cannot figure out how to hide and show
>
the window, much less slide it around.
This method of NSWindow will do what you want:
- setFrame:(NSRect)frameRect display:(BOOL)displayFlag
animate:(BOOL)animateFlag
First position the window above the menu bar. Then use the
setFrame:display:animate: method to set a new rect, of the same size, same x
coordinate, but with a lower y coordinate.
>
Furthermore, I cannot create an NSRect. This code:
>
NSRect myRect;
>
>
Results in the following error:
>
SBAppController.m:23: illegal statement, missing `;' after `NSRect'
What's on the line before that?
>
I tried several variations on this, including making a pointer to an
>
NSRect. It would seem that NSRect is important in moving windows. Why
>
doesn't this work?
>
>
Thank you.
/ David
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.