Re: Superimpose a NSTextField over NSImageView? [SOLVED]
Re: Superimpose a NSTextField over NSImageView? [SOLVED]
- Subject: Re: Superimpose a NSTextField over NSImageView? [SOLVED]
- From: Uli Kusterer <email@hidden>
- Date: Tue, 25 Apr 2006 12:34:06 +0200
Am 24.04.2006 um 20:10 schrieb desktoast music productions:
Never did that before. I tried it, but whatever I did, the
resulting window
is bordered with all its widgets and stuff. What am I missing?
Have you made sure you override the *right* constructor (i.e. the
one that NSNibLoading calls when a NIB is loaded)? Also, are you
changing the styleMask passed in when you call through to NSWindow's
method (using [super initWithContentRect: ... ])? Here's what I use:
// Designated Initializer:
-(id) initWithContentRect: (NSRect)box styleMask: (unsigned int)sty
backing: (NSBackingStoreType)bs defer: (BOOL)def
{
self = [super initWithContentRect:box styleMask:
NSBorderlessWindowMask backing:bs defer: def];
if( self != nil )
{
// Do some more init stuff
}
return self;
}
Instead of hard-coding the styleMask, you can also just mask out
certain flags from the style mask you get, but in that case you have
to be careful only to allow valid masks. E.g. a close box on a
borderless window is obviously nonsense, where would AppKit put it
without a border? In that case AppKit may just turn on the border
again and ignore the borderless attribute, or do whatever it wants...
Cheers,
-- M. Uli Kusterer
http://www.zathras.de
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden