• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Superimpose a NSTextField over NSImageView? [SOLVED]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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
  • Follow-Ups:
    • Re: Superimpose a NSTextField over NSImageView?
      • From: desktoast music productions <email@hidden>
References: 
 >Re: Superimpose a NSTextField over NSImageView? [SOLVED] (From: desktoast music productions <email@hidden>)

  • Prev by Date: Re: Getting user and group names from user and group IDs
  • Next by Date: Re: Creating an instance of a subclass from a superclass initilization
  • Previous by thread: Re: Superimpose a NSTextField over NSImageView? [SOLVED]
  • Next by thread: Re: Superimpose a NSTextField over NSImageView?
  • Index(es):
    • Date
    • Thread