Reputation: 49
I have an NSAlert and I set its accessoryView to be an NSTableView. It works good with small-medium amounts of data, but when the row count is getting large, the tableview resizes instead of getting a scrollbar. I would expect the table to only take up as much space as I give it in the Init frame.
var alert = NSAlert()
var sampleTable = NSTableView(frame: NSRect(x: 0, y:0, width: 400, height:400))
sampleTable.dataSource = self
alert.accessoryView = sampleTable
alert.beginSheetModal(...) // irrelevant code from here on
Upvotes: 0
Views: 321
Reputation: 5609
Set the scrolliew.autohidesScrollers = false
and scrollView.hasHorizontalScroller = true
where scrollView is an NSScrollView instance
Upvotes: 0