• 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
NSTableHeaderView and NSTableView problem...
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSTableHeaderView and NSTableView problem...


  • Subject: NSTableHeaderView and NSTableView problem...
  • From: Allan Dushan <email@hidden>
  • Date: Fri, 9 Jan 2004 10:06:32 -0800

I am attempting to create a subclass of NSTableHeaderView so that I can
override
+ (NSMenu*)defaultMenu;
- (NSMenu *)menuForEvent:(NSEvent *)theEvent;
so that I can provide a different contextual menu based on the column
header the mouse is over.

In Interface Builder I am using an NSTableView, and then in my code I
am using awakeFromNib to replace the current NSTableHeaderView with my
subclass of NSTableHeaderView. When I do this the table header does not
appear, leaving me with white space above the table. The code I am
using is as follows:

MyTableHeaderView *customTableHeaderView = [[MyTableHeaderView alloc]
init];

[tableView setHeaderView:customTableHeaderView];

This seemed straight forward, but I must be missing other
initialization code that is required. Anyone know what else needs to be
done?

Thanks,

Allan Dushan
email@hidden
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: NSTableHeaderView and NSTableView problem...
      • From: Jörn Salewski <email@hidden>
  • Prev by Date: NSZone: generic question
  • Next by Date: Maintaining selection while actively updating table contents
  • Previous by thread: NSZone: generic question
  • Next by thread: Re: NSTableHeaderView and NSTableView problem...
  • Index(es):
    • Date
    • Thread