Questions tagged [nsoutlineview]

NSOutlineView is a subclass of NSTableView that uses a row-and-column format to display hierarchical data that can be expanded and collapsed, such as directories and files in a file system. A user can expand and collapse rows, edit values, and resize and rearrange columns.

Like a table view, an outline view does not store its own data, instead it retrieves data values as needed from a data source to which it has a weak reference (see Communicating With Objects). See the NSOutlineViewDataSource protocol, which declares the methods that an NSOutlineView object uses to access the contents of its data source object.

An outline view has the following features:

  • A user can expand and collapse rows.

  • Each item in the outline view must be unique. In order for the collapsed state to remain consistent between reloads the item's pointer must remain the same.

  • The view gets data from a data source (see the NSOutlineViewDataSource protocol).

  • The view retrieves only the data that needs to be displayed.

659 questions
0
votes
1 answer

NSOutlineView - How to remove the expand/collapse toggle

I have a NSOutlive view that I would like to remove the toggle from some rows. The Zones and Assets rows are group items (header rows) and should not be collapsable. The problem is that is I answer NO to - (BOOL)outlineView:(NSOutlineView…
Justin808
  • 20,859
  • 46
  • 160
  • 265
0
votes
1 answer

NSOutlineTableView Crash after last element

I have an NSOutlineTableView that is displaying hierarchical HTML data, loaded from an HTML parser (each HTML tag is an object with attributes and an array of it's children). For some reason, this code crashes AFTER it has run through all the…
Chris
  • 1,037
  • 15
  • 26
-1
votes
0 answers

How to restore simple click-and-drag multi-selection in a standard sidebar (NSOutlineView based)?

I want the default behavior (no d&d) without needing a modifier key. But changing the selectionHighlightStyle to NSTableViewSelectionHighlightStyleSourceList or using the view in an NSSplitViewItem sidebar alters this behavior, requiring an…
Yansen13
  • 9
  • 2
-1
votes
1 answer

NSOutlineView show indentation marker

How do I generate indentation marker for NSOutlineView? I am not sure if this is an inbuilt functionality because it appears in other apps like Instruments Update I tried solving the problem by iterating all the children of the item that the row…
Kaunteya
  • 3,107
  • 1
  • 35
  • 66
-1
votes
2 answers

Cocoa bindings - Sorting error for a specific column

I use a NSOutlineView bound to a NSTreeController. I successfully managed to sort all columns of the view, except one! This column displays a button that is enabled if the binaryData field is not nil. The binaryData field in the model is a…
-1
votes
1 answer

How can I autosize first Column of a NSOutlineView to take all available space

I'm using NSOutlineView for the first time and have 3 columns. What I want is for the first column to expand to fill the available space, leaving columns 2 and 3 aligned to the right margin of the NSOutlineView. I have managed to get the last column…
PhilC
  • 123
  • 8
-1
votes
1 answer

How to add item into NSOutlineView in the edit mode?

I am working with NSOutlineView, and everything works well, I can enter edit mode when clicking on the table cell. However, I want to enter the edit mode automatically when a new row is inserted. I played around with makeFirstResponder method, but…
-1
votes
2 answers

NSOutlineView Problem with Child / Parent element

I am implementing NSOutlineView and having implemented following method, -(void) initOutlineView{ pMyOutlineView = [[[MyUICustomOutlineView alloc] initWithFrame:clipViewBounds] …
Amitg2k12
  • 3,765
  • 10
  • 48
  • 97
-1
votes
1 answer

NSOutlineView Data Source not called in Mac OS 10.10

My app has a cell-based NSOutlineView which its data source is a NSMutableArray. In the initialisation, my app loads the NSMutableArray from a text file. Then, the NSOutlineView will be populated with the NSMutableArray. NSOutlineView is populated…
albertleng
  • 61
  • 7
-1
votes
1 answer

NSOutlineView Sidebar help

I'm trying to create a simple sidebar using NSOutlineView..... how would I do this? (I'm using CoreData)
nanochrome
  • 707
  • 2
  • 12
  • 26
-1
votes
2 answers

How to paint rows in NSOutlineView like in Finder.app

How can I set blue background for every second row in NSOutlineView, like it does Finder.app?
Lobster
  • 635
  • 2
  • 12
  • 30
-2
votes
1 answer

select outlineView row with nsbutton

i working with swift 4 for osx. i have nsoutlineview with custom cells. in each cell is a button. in my outlineView-Controller-Class is an IBAction action for this button: @IBAction func showInfo(_ sender: NSButton) { // Get the row of…
Trombone0904
  • 4,132
  • 8
  • 51
  • 104
-2
votes
2 answers

How can I detect Escape key pressed in NSOutlineView?

I have Created Simple cocoa app. In which I use NSOutlineView. Now my task is to get the event of Escape Key pressed. In my appdelegate.m I implemented all require method for NSOutlineView.
Mahesh Mahajan
  • 101
  • 1
  • 11
-8
votes
2 answers

Subclassing NSOutlineView

How would you Subclass an NSOutlineView?
Joshua
  • 15,200
  • 21
  • 100
  • 172
1 2 3
43
44