Modifying TableHeaderCell
Modifying TableHeaderCell
- Subject: Modifying TableHeaderCell
- From: Gustavo Pizano <email@hidden>
- Date: Wed, 2 Dec 2009 12:51:14 +0100
Hello, I know this has been asked, but the answers I have found on internet even gave me a light of what to do, i still can't accomplish what I want.
I subclassed NSTableHeaderView, NSTableHeaderCell, NSTableView then I make the table header to be class of my custom class. Then I read that to modify the height of the cell I must override these methods:
- (NSRect)titleRectForBounds:(NSRect)theRect ;
and
- (void)drawInteriorWithFrame:(NSRect)cellFrame inView:(NSView *)controlView ;
I did so, making in the first method returning a rect with the desired dimensions. then on the awakefromnib of the custom class of NSTableView, I assign to the colum headder cell, an instance of my custom NSTableHeaderCell.
now in my custom NSTableHeaderView., in the drawRect method, Im drawing the propper background, and of course, I need to get the title of the cell to create a rect and draw the rect above the background, otherwise it will be not shown because its bellow.
But anyway.. Im a little bit confused on what should I do to make this work, Im still looking for examples, some of them showed me how to setup the background on the header, but I hadn't found anything to make the header bigger in height.
Thanks in advance.
Gustavo
_______________________________________________
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