Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > NSBox With TableView BG

NSBox With TableView BG
Thread Tools
Grizzled Veteran
Join Date: Jun 2002
Status: Offline
Reply With Quote
Mar 14, 2004, 06:46 AM
 
Hi guys,

I've created a NSBox subclass and am hoping to fill it with the NSTableView header image. The aqua glossy bar thing.

I have got to the point where I can fill the box with a color, but how do I fill it with the glossy Aqua bar?

Heres my code:

Code:
- (void)drawRect:(NSRect)rect { [[NSColor colorWithCalibratedRed:1.0 green:0.0 blue:0.0 alpha:0.1] set]; NSRectFillUsingOperation(rect, NSCompositeSourceOver); } - (id)initWithFrame:(NSRect)frameRect { [super initWithFrame: frameRect]; return self; }
     
Mac Elite
Join Date: Feb 2001
Location: Vancouver, WA
Status: Offline
Reply With Quote
Mar 14, 2004, 03:47 PM
 
In your -drawRect: implementation, instantiate an NSTableHeaderCell, set the attributes (highlighted, etc) on it you want, and tell it to draw.
Rick Roe
icons.cx | weblog
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 09:02 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2