Inherits From:
NSWindow : NSResponder : NSObject
Conforms To:
NSCoding (NSResponder)
NSObject (NSObject)
Declared In:
AppKit/NSPanel.h
setBecomesKeyOnlyIfNeeded:
method controls this behavior.
setFloatingPanel:
method controls this behavior.
setWorksWhenModal:
method controls this behavior. See "Modal Windows" in the NSWindow class specification for more information on modal windows and panels.
becomesKeyOnlyIfNeeded
Returns YES if the receiver becomes the key window only when the user clicks a view object that needs to be first responder to receive event and action messages; for example if it edits text or otherwise accepts keyboard input. Returns NO if it becomes the key window whenever clicked. NSPanel by default returns NO, indicating that panels become key as other windows do.
See also:
- setBecomesKeyOnlyIfNeeded:
, - needsPanelToBecomeKey
(NSView)
isFloatingPanel
Returns YES if the receiver is set to float above normal windows, NO otherwise. A floating panel's window level is NSFloatingWindowLevel. NSPanels by default returns NO, indicating that they inhabit the normal window level.
See also:
- setFloatingPanel:
,
- level
(NSWindow)
setBecomesKeyOnlyIfNeeded:
(BOOL)flag
Controls whether the receiver only becomes the key window when the user clicks a view object that edits text or otherwise accepts keyboard input. If flag is YES, the receiver only becomes the key window when keyboard input is needed; if flag is NO, it becomes the key window whenever clicked. This behavior is by default not set. You should consider setting it only if most controls in the NSPanel aren't text fields, and if the choices that can be made by entering text can also be made in another way (such as by clicking an item in a pick list).
See also:
- becomesKeyOnlyIfNeeded
,
- needsPanelToBecomeKey
(NSView)
setFloatingPanel:
(BOOL)flag
Controls whether the receiver floats above normal windows. If flag is YES, sets the receiver's window level to NSFloatingWindowLevel; if flag is NO, sets the receiver's window level to NSNormalWindowLevel. The default is NO. It's appropriate for an NSPanel to float above other windows only if all of the following conditions are true:
- isFloatingPanel
,
- level
(NSWindow)
setWorksWhenModal:
(BOOL)flag
Controls whether the receiver receives keyboard and mouse events even when some other window is being run modally. If flag is YES, the application object sends events to the receiver even during a modal loop or session; if flag is NO, the receiver gets no events while a modal loop or session is running. See ""Modal Windows"" in the NSWindow class specification for more information on modal windows and panels.
See also:
Returns YES if the receiver is able to receive keyboard and mouse events even when some other window is being run modally, NO otherwise. NSPanels by default returns NO, indicating their ineligibility for events during a modal loop or session. See ""Modal Windows"" in the NSWindow class specification for more information on modal windows and panels.
See also:
- worksWhenModal
,
- runModalSession:
(NSApplication)
worksWhenModal
- (BOOL)worksWhenModal
- setWorksWhenModal:
, - runModalForWindow:
(NSApplication),
- runModalSession: (NSApplication)
[TOC] [Prev] [Next] [Bottom]
Copyright © 1997, Apple Computer, Inc. All rights
reserved.