Re: How to control the window by cocoa
Re: How to control the window by cocoa
- Subject: Re: How to control the window by cocoa
- From: Andrew Farmer <email@hidden>
- Date: Wed, 15 Apr 2009 22:18:16 -0700
On 14 Apr 09, at 23:32, Joe Yi wrote:
hello everybody: These days I beginning to develop a application
with
xcode.
the program confine the window,make it can‘t be resize.
You can do this from Interface Builder. Look in the properties for a
window.
and limit the frame of the window .make it can't out of the area of
the
screen. When the border of the window touch
the border of the screen. It'll come out a warning message box and
stop it.
This sounds incredibly annoying. AppKit already prevents you from
moving windows too far off the screen, so unless there's some specific
reason you need this functionality, I'd advise against trying to
implement it. (In particular, displaying an alert in response to an
attempt to move the window off the edge of the screen is a really bad
idea, as it may show up while the user still has the mouse button down.)
That all being said, NSWindow has a delegate method that'll help you
here. Look through the documentation - it should be pretty obvious
which one it is. Between that and NSScreen, you should be set._______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden