Skip navigation.
 
mlRe: Smart way to get "etched" borders in Leopard
FROM : Jesse Grosjean
DATE : Thu Nov 08 22:29:25 2007

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_removed> 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
>

Related mailsAuthorDate
mlSmart way to get "etched" borders in Leopard jesse Nov 4, 18:33
mlRe: Smart way to get "etched" borders in Leopard Chris Hanson Nov 5, 01:00
mlRe: Smart way to get "etched" borders in Leopard Rob Keniger Nov 5, 03:57
mlRe: Smart way to get "etched" borders in Leopard Jesse Grosjean Nov 8, 22:29
mlRe: Smart way to get "etched" borders in Leopard Ken Ferry Nov 8, 23:00
mlRe: Smart way to get "etched" borders in Leopard Andrew Kimpton Nov 9, 22:42
mlRe: Smart way to get "etched" borders in Leopard Ken Ferry Nov 10, 02:10
mlRe: Smart way to get "etched" borders in Leopard Andrew Kimpton Nov 10, 04:41
mlRe: Smart way to get "etched" borders in Leopard Jesse Grosjean Nov 10, 05:30
mlRe: Smart way to get "etched" borders in Leopard Antonio Nunes Nov 10, 08:41
mlRe: Smart way to get "etched" borders in Leopard Jesse Grosjean Nov 11, 16:28