• 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
Tall NSTableView Column Headers
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Tall NSTableView Column Headers


  • Subject: Tall NSTableView Column Headers
  • From: Keith Renz <email@hidden>
  • Date: Thu, 21 Oct 2004 17:00:17 -0400

I need a NSTableView with tall column headers to accommodate 2 lines of text. I previously received a reply (sorry, lost the reply) which said I should subclass NSTableHeaderView and override headerRectOfColumn:. This does not work. I have, in fact, subclassed NSTableHeaderView and replaced my nib's NSTableView's header view with my new NSTableHeaderView subclass. Overriding initWithFrame: with a taller frame allows space for a taller header, but the standard header view is being drawn centered vertically in the new space. So, what I end up with is a taller header (white space) with the standard header drawn in the middle. This means that I also need to override NSTableHeaderCell (which does the drawing), and I have done so. Unfortunately, there is still no way to get the standard "look" as it appears to be a private theme drawing method. I realize that, in my NSTableHeaderCell subclass, I must override NSCell's drawWithFrame:inView:, drawInteriorWithFrame:inView:, highlight:withFrame:inView: and possibly other methods. This is a lot of work for something seemingly straight forward. You can easily set a table view's row height, but not the header height -- doesn't make sense. I've checked the archives and can't find anything similar. If anyone knows a easier way to do this or can point me to some sample code, I'd be grateful.

Thanks,

Keith

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden
  • Follow-Ups:
    • Re: Tall NSTableView Column Headers
      • From: Andrew Hunter <email@hidden>
    • Re: Tall NSTableView Column Headers
      • From: Larry Fransson <email@hidden>
  • Prev by Date: Re: Toolbar Item Validation in a Panel
  • Next by Date: Re: Toolbar Item Validation in a Panel
  • Previous by thread: Re: Cocoa & Excel
  • Next by thread: Re: Tall NSTableView Column Headers
  • Index(es):
    • Date
    • Thread