• 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: Global utility windows
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Global utility windows


  • Subject: Re: Global utility windows
  • From: Bill Cheeseman <email@hidden>
  • Date: Sat, 21 Dec 2002 17:25:36 -0500

on 02-12-21 4:44 PM, Finlay Dobbie at email@hidden wrote:

> On Saturday, December 21, 2002, at 09:27 pm, Clark Mueller wrote:
>
>> Can these be done in Cocoa? What I'm looking for is a window that
>> behaves like a utility window but that stays floating in all
>> applications, like is used in Christ's Tree (it's on Apple's main Mac
>> OS X downloads page, right now)? Can it be done in Cocoa? Can it be
>> done in Carbon? I haven't been able to find how to do it at all, but
>> I've seen a lot of evidence that it's possible. I haven't found any
>> kind of documentation that has tipped me off, and all of my web
>> searches on the topic have turned up dry - many examples of apps that
>> use them, but none on how to make them.
>
> See NSWindow's setWindowLevel method for the Cocoa way of doing it (and
> also see CGWindowLevel.h in CoreGraphics.framework).

In Cocoa, you can do it right in IB. Make your window an NSPanel, then check
the Utility Window setting. ("Utility window" doesn't stand right out as
meaning global floating, but that's what it means, at least if you put
[[self window] setHidesOnDeactivate:NO] in your controller's awakeFromNib
method.

If you don't want to do it in IB, look at setFloatingPanel: in NSPanel.

--

Bill Cheeseman - email@hidden
Quechee Software, Quechee, Vermont, USA
http://www.quecheesoftware.com

The AppleScript Sourcebook - http://www.AppleScriptSourcebook.com
Vermont Recipes - http://www.stepwise.com/Articles/VermontRecipes
Croquet Club of Vermont - http://members.valley.net/croquetvermont
_______________________________________________
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.

References: 
 >Re: Global utility windows (From: Finlay Dobbie <email@hidden>)

  • Prev by Date: Re: Global utility windows
  • Next by Date: Re: Global utility windows
  • Previous by thread: Re: Global utility windows
  • Next by thread: Re: Global utility windows
  • Index(es):
    • Date
    • Thread