• 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: Smart way to get "etched" borders in Leopard
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Smart way to get "etched" borders in Leopard


  • Subject: Re: Smart way to get "etched" borders in Leopard
  • From: Jesse Grosjean <email@hidden>
  • Date: Thu, 8 Nov 2007 16:29:25 -0500

Chris,

Thanks for your response. I got busy and then was away, so I didn't have time to try things out until today. The good news is that [NSCell backgroundStyle] looks really useful, but unfortunately it doesn't do what I want in this case.

I'll try to explain myself better this time. Here's a Leopard screenshot of the bottom of a safari window. You can see that right below the scroll view there are two lines that form a etching of some sort. From top to bottom, a dark (black?) line followed by a lighter line.

	http://hogbaysoftware.com/files/leapardscreen.png

You see these lines all over the place in apples new iLife, iCal, etc. I've done these "etched" borders before by subclassing NSBox I think, but that seems pretty heavy weight. And I was always left guessing on the exact colors that I should use.

So I'm wondering what the best way to achieve this effect in a Leopard only app is. Does anyone have suggestions?

Thanks,
Jesse

On Nov 4, 2007, at 7:00 PM, Chris Hanson wrote:

On Nov 4, 2007, at 9:33 AM, email@hidden wrote:

Can someone tell me what the smart way to get etched (not sure if that's
the right term) borders for a Leopard only app. My app will used a
Textured Window, and I want to have borders that look like the borders in
iChat at the top and bottom of the scroll view.

Like in the bottom bar of Address Book, too?

This is documented in the Application Kit Release Notes (10.5) under "Text and image effects: -[NSCell backgroundStyle]":

For example, if you place an borderless NSTextField directly on the window surface you will likely want to have a controller call setBackgroundStyle:NSBackgroundStyleRaised on the text cell to get engraved text.

Hope this helps!

  -- Chris


_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Smart way to get "etched" borders in Leopard
      • From: "Ken Ferry" <email@hidden>
References: 
 >Smart way to get "etched" borders in Leopard (From: email@hidden)
 >Re: Smart way to get "etched" borders in Leopard (From: Chris Hanson <email@hidden>)

  • Prev by Date: Re: Implementing binding with garbage collection.
  • Next by Date: Re: University courses in Cocoa/Objective-C?
  • Previous by thread: Re: Smart way to get "etched" borders in Leopard
  • Next by thread: Re: Smart way to get "etched" borders in Leopard
  • Index(es):
    • Date
    • Thread