Skip navigation.
 
mlRe: NSPanel with just a close button & title on title bar?
FROM : Andreas Mayer
DATE : Thu Nov 18 20:20:51 2004

Am 18.11.2004 um 19:17 Uhr schrieb Ricky Sharp:

> It also mentions that there's supposedly some API introduced in 10.2
> to access & remove the "border view buttons".  But there's no mention
> of where that API lives or what it's exactly named.


--- snip ---
AppKit class NSWindow

standardWindowButton:

- (NSButton *)standardWindowButton:(NSWindowButton)button
Return the given standard button if it is in the window view hierarchy.

Availability

Available in Mac OS X v10.2 and later.
--- snip ---

NSWindowButton

typedef enum {
    NSWindowCloseButton,
    NSWindowMiniaturizeButton,
    NSWindowZoomButton,
    NSWindowToolbarButton,
    NSWindowDocumentIconButton
} NSWindowButton;

--- snip ---

So this should remove the zoom button from a window:

[[window standardWindowButton:NSWindowZoomButton] removeFromSuperview];


Andreas

Related mailsAuthorDate
mlNSPanel with just a close button & title on title bar? Ken Tabb Nov 18, 17:50
mlRe: NSPanel with just a close button & title on title bar? Ricky Sharp Nov 18, 19:17
mlRe: NSPanel with just a close button & title on title bar? Andreas Mayer Nov 18, 20:20
mlRe: NSPanel with just a close button & title on title bar? Peter Maurer Nov 19, 08:40
mlRe: NSPanel with just a close button & title on title bar? Ken Tabb Nov 19, 12:05
mlRe: NSPanel with just a close button & title on title bar? Ryan Stevens Nov 19, 17:38
mlRe: NSPanel with just a close button & title on title bar? Evan Schoenberg Nov 19, 22:39
mlRe: NSPanel with just a close button & title on title bar? M. Uli Kusterer Nov 22, 08:53
mlRe: NSPanel with just a close button & title on title bar? Ryan Stevens Nov 22, 15:33
mlRe: NSPanel with just a close button & title on title bar? M. Uli Kusterer Nov 23, 22:36