Skip navigation.
 
mlRe: Smart way to get "etched" borders in Leopard
FROM : Antonio Nunes
DATE : Sat Nov 10 08:41:06 2007

On 10 Nov 2007, at 04:30, Jesse Grosjean wrote:

> We are probably driving you nuts with our stupidity, but I'm also 
> still having a hard time getting this to work. For a textured window 
> I the call setContentBorderThickness:forEdge: does seem to make a 
> difference in the background, but as you say no black line is drawn 
> in that case. But when I try 
> setContentBorderThickness:forEdge:NSMinYEdge on a normal non 
> textured window I don't see any change in it's appearance at all.
>
> Thanks again for your help, I'm sure the answer is sitting right 
> there, I just can't seem to get it.
>
> Can someone walk me through how to make this work the really slow 
> way :)



The way I understood and implemented it, you have place this call at 
the right moment. What I did is to create an NSWindow subclass and put 
the code in initWithContentRect:styleMask:backing:defer:

E.g:

@implementation MyNSWindowSubclass

- (id)initWithContentRect:(NSRect)contentRect styleMask:
(NSUInteger)windowStyle backing:(NSBackingStoreType)bufferingType 
defer:(BOOL)deferCreation
{
   self = [super initWithContentRect:contentRect styleMask:windowStyle 
backing:bufferingType defer:deferCreation];
   
   if (self) {
       [self setContentBorderThickness:20.0 forEdge:NSMinYEdge];
   }
   
   return self;
}

@end

The window is not textured.

Good luck!

-António

--------------------------------------------
I try to take one day at a time, but sometimes, several days attack me 
all at once!
--------------------------------------------

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