• 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: Modifying TableHeaderCell
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Modifying TableHeaderCell


  • Subject: Re: Modifying TableHeaderCell
  • From: Gustavo Pizano <email@hidden>
  • Date: Wed, 2 Dec 2009 23:06:21 +0100

Hello Mark thanks for your reply..

I was looking at Matt's code and I was close to what he was doing, but still I ccan' make it work even I modify the title attributes to make a bigger NSRect,,, dunno what Im missing here, is it even possible to do so?

G


On Dec 2, 2009, at 10:26 PM, Mark Allan wrote:

>
> On 2 Dec 2009, at 11:51 am, Gustavo Pizano wrote:
>
>> 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.
>
> Have a look at Matt Gemmell's code called iTableColumnHeader.  You'll find it at http://mattgemmell.com/source
>
> I don't think it changes the height of the header, but it's very easy to modify it to your needs.
>
> Mark
>
>

_______________________________________________

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

References: 
 >Modifying TableHeaderCell (From: Gustavo Pizano <email@hidden>)
 >Re: Modifying TableHeaderCell (From: Mark Allan <email@hidden>)

  • Prev by Date: What does the 8GB limit in GC really mean? Re: libauto: what's "agc error: Can not allocate new region"
  • Next by Date: image not found
  • Previous by thread: Re: Modifying TableHeaderCell
  • Next by thread: libauto: what's "agc error: Can not allocate new region"
  • Index(es):
    • Date
    • Thread