• 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: Custom Title bars
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Custom Title bars


  • Subject: Re: Custom Title bars
  • From: Louis Sinclair <email@hidden>
  • Date: Thu, 25 Aug 2005 13:54:02 -0500

I'm looking at this from another angle now, and have something that almost works.

I made a borderless window (It's a fixed sized window) and put a backing image in the window that includes a title bar. I placed a custom NSView widget over the fake title bar and subclassed NSView to track mouse drags, allowing me to move the window if the user drags it.

My new question is: Can I use the standard window titlebar buttons independently? I'd like to put my own buttons in my fake toolbar. Then I'll be almost there :)

--
Louis


At 12:59 PM 8/25/05, Ryan Stevens wrote:
I'm sure it'll take some trial and error but the first thing I would
try is just adding a view to the button's superview. It might end up
drawing over the title text but then maybe your view could grab the
title and draw it over the image...

I haven't done any titlebar trickery since 10.2 so details are a bit
fuzzy, sorry.

On Aug 25, 2005, at 9:37 AM, Louis Sinclair wrote:

Thanks Ryan.  Can you elaborate on this?  I've experimented with
this idea, but wasn't sure how to proceed.

I've got a custom NSView that find's its containing window's close
button in the drawRect function, and I can get a pointer to the
close button's superview, but I'm not sure what to do from there.

--
Louis


At 11:02 AM 8/25/05, Ryan Stevens wrote:

No, don't draw the window yourself - too much work to get anything
close to the standard. Instead you can grab a standardWindowButton
(see NSWindow docs) and go from there.


On Aug 25, 2005, at 8:36 AM, Jason Swain wrote:


You may need to draw the window yourself. Start with a transparent
window and fill in what you need. This may be a hassle as you will
need to do your own close buttons etc, but it may work for you.

Have a look at this:

http://developer.apple.com/samplecode/RoundTransparentWindow/
RoundTransparentWindow.html


Jason


On 25 Aug 2005, at 15:55, Louis Sinclair wrote:



Hi all,

How would one go about making a custom title bar on a window.  All
I really need to do is apply a backdrop image to the title bar
area.

Thanks!


-- Louis Sinclair

-- Louis Sinclair Minnetonka Audio Software, Inc.


-- Louis Sinclair Minnetonka Audio Software, Inc.

_______________________________________________
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


References: 
 >Custom Title bars (From: Louis Sinclair <email@hidden>)
 >Re: Custom Title bars (From: Jason Swain <email@hidden>)
 >Re: Custom Title bars (From: Ryan Stevens <email@hidden>)
 >Re: Custom Title bars (From: Louis Sinclair <email@hidden>)
 >Re: Custom Title bars (From: Ryan Stevens <email@hidden>)

  • Prev by Date: Re: Need help in setting up an NSTevtView in an overlay window
  • Next by Date: Re: Converting JPEG Image Greater Than 72dpi To 72dpi (SOLVED)
  • Previous by thread: Re: Custom Title bars
  • Next by thread: Re: Alloc Mocks my World
  • Index(es):
    • Date
    • Thread