Questions tagged [nstableheadercell]

The NSTableHeaderCell class is used by an NSTableHeaderView instance to draw the content of the column headers.

The NSTableHeaderCell class is used by an NSTableHeaderView instance to draw the content of the column headers.

This specific subclass is responsible for drawing the sort indicators.

Subclasses of the NSTableHeaderCell class can override the drawInteriorWithFrame:inView:, editWithFrame:inView:editor:delegate:event:, and highlight:withFrame:inView: methods to change the way headers appear. See the NSCell class specification for information on overriding these methods.

Reference: https://developer.apple.com/library/mac/documentation/cocoa/reference/applicationkit/classes/NSTableHeaderCell_Class/Reference/Reference.html

10 questions
2
votes
0 answers

Swift: NSPopUpButtonCell in NSTableHeaderCell

I cannot for the life of my figure out how to get an NSPopUpButtonCell to work in a NSTableHeaderCell. I've tried to implement the solution here: Getting duplicate header button cell in NSTableView when using NSPopUpButtonCell but it seems some of…
Chris
  • 1,005
  • 1
  • 13
  • 27
2
votes
1 answer

How to set the column name of an NSTableColumn in a view-based NSTableView?

I've created an NSTableView programmatically and added a single column (an instance of NSTableColumn). How can I set the name of this column (by default it's named "Field")? In NSTableColumn there's a method with signature -…
1
vote
1 answer

Swift 5 - Firebase- create array from data in firebase

I am trying to create an array from my data in firebase so that I can load it as a header in my tableview. I understand how to put the data into the section headers when I have the information hard coded in an array in the code but I am unsure how…
MattyJay94
  • 39
  • 1
  • 8
1
vote
2 answers

How to customize NSTableView header on macOS 10.12+?

MacOS 10.12+, Xcode 8+, Swift 3: I'd like to programmatically customize the font and drawing of an NSTableView header. I know there are older questions about this, but I couldn't find anything that works today. For example, I tried to subclass…
sam
  • 3,399
  • 4
  • 36
  • 51
1
vote
0 answers

How Do I Add Subviews to an NSTableHeaderCell?

I have been experimenting with customizing NSTableViews and have gotten onto NSTableHeaderView and NSTableHeaderCell now. I have a simple need. Each NSTableHeaderCell I want to plant my custom view onto. Which simply consists of two buttons. Here is…
Josh Kahane
  • 16,765
  • 45
  • 140
  • 253
1
vote
1 answer

NSTableHeaderCell detect mouse down?

I'm attempting to customize a NSTableHeaderCell to detect mouse clicks. In the past i've used things such as an NSTrackingArea or overriding the mouseDown event such as: -(void)mouseDown:(NSEvent *)theEvent { NSLog(@"Mouse down"); } These…
Kyle
  • 17,317
  • 32
  • 140
  • 246
0
votes
0 answers

Custom NSTableHeaderCell crashes when the table is resized

My application crashes when I create a custom NSTableHeaderCell for my NSTableView that does nothing except store a single optional of type NSFont. The table view draws fine the first time, but the app crashes when the table view is resized. I have…
dcsalmon
  • 61
  • 5
0
votes
0 answers

NSTableHeaderCell and controlBackgroundColor for Dark Mode

I've been trying to customise a NSTableHeaderCell, for this I created a subclass of it and implemented the func draw(withFrame cellFrame: NSRect, in controlView: NSView) where I draw the background with the NSColor.controlBackgroundColor. Problem is…
Luis
  • 533
  • 1
  • 6
  • 19
0
votes
1 answer

Message flow problems with NSTableHeaderView and NSTableHeaderCell while trying to produce transparent NSTableView Header

Problem: I am trying to create a custom transparent TableView Header and I have created subclasses of NSTableHeaderView and NSTableHeaderCell and overridden -drawWithFrame:inView and -drawInteriorWithFrame:inView in the NSTableHeaderCell subclass.…
0
votes
1 answer

Swift: Unable to add NSTableHeaderCell to NSTableView

So I'm drawing an NSTableView programmatically, however, I'm unable to draw the header. Any ideas? let tableContainer: NSScrollView = NSScrollView(frame: NSMakeRect(20, 50, 380, 200)) let tableView: NSTableView = NSTableView(frame: NSMakeRect(0, 0,…
David
  • 3,226
  • 3
  • 23
  • 18