Keeping controls in floating palettes activated
Keeping controls in floating palettes activated
- Subject: Keeping controls in floating palettes activated
- From: Mark Alldritt <email@hidden>
- Date: Fri, 09 Jul 2004 07:41:54 -0700
Hi Folks,
I have some palette windows in my application, and I'm having difficulty
getting them to operate correctly. The problem is that controls (sliders,
scroll bars, etc.) in my palette window don't appear as active unless the
palette window is the key window.
So, I guess my question is how do I make my palette windows appear active
when my document window is key? Other applications (OMNI Graffle and OMNI
Outliner illustrate that this is possible, but I cannot figure out how).
I'm creating the palette window programmatically like this (my class is a
subclass of NSPanel):
- (id) initWithFrame:(NSRect) frame;
{
self = [super initWithContentRect:frame
styleMask:NSBorderlessWindowMask |
NSUtilityWindowMask |
NSNonactivatingPanelMask
backing:NSBackingStoreBuffered
defer:NO];
if (self)
{
//[self setLevel:NSFloatingWindowLevel];
[self setHidesOnDeactivate:YES];
[self setFloatingPanel:YES];
//[self setBecomesKeyOnlyIfNeeded:YES];
[self setHasShadow:YES];
}
return self;
}
- (id)initWithContentRect:(NSRect)contentRect
styleMask:(unsigned int)aStyle
backing:(NSBackingStoreType)bufferingType
defer:(BOOL)flag
{
return [self initWithFrame:contentRect];
}
- (BOOL) canBecomeKeyWindow { return YES; }
- (BOOL) canBecomeMainWindow { return NO; }
Cheers
-Mark
---------------------------------------------------------------------
Mark Alldritt Late Night Software Ltd.
Phone: 250-380-1725 333 Moss Street
FAX: 250-383-3204 Victoria, B.C.
WEB:
http://www.latenightsw.com/ CANADA V8V-4M9
_______________________________________________
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.