Questions tagged [nsbrowser]

NSBrowser is a Cocoa control that breaks down items hierarchically.

NSBrowseris a Cocoa Control () that provides a user interface for displaying and selecting items from a list of data or from hierarchically organized lists of data, such as directory paths. When working with a hierarchy of data, the levels are displayed in columns, which are indexed from left to right.

A good example of an NSBrowser control in action is the column view of the OS X Finder ().

References:

33 questions
1
vote
0 answers

How to set custom NSMatrix in an NSBrowser

I am trying to customise background colours for an NSBrowser. To do this I am trying to subclass NSMatrix, set me new class as the matrix class for columns using setMatrixClass:, and then customise the matrix somehow, maybe using drawRect:. I can…
Sparklellama
  • 712
  • 1
  • 6
  • 18
1
vote
1 answer

Prevent Horrendously Wide NSBrowserCell Tool Tips

I am setting my NSBrowser matrix cells' tool tips with the below code: - (void) browser:(NSBrowser *)sender willDisplayCell:(id)cell atRow:(int)row column:(int)column { NSMatrix *matrix = [sender matrixInColumn:column]; NSLog(@"'%@'",…
Michael Robinson
  • 29,278
  • 12
  • 104
  • 130
0
votes
1 answer

Cocoa NSBrowser and CFURLEnumeratorCreateDirectoryURL

I'm trying to understand the sample from Apple "ComplexBrowser", but it's really hard to find any material/tutorial to "CFURLEnumeratorCreateDirectoryURL". ComplexBrowser Sample from Apple What exactly is going on in this piece of code? I didn't…
0
votes
1 answer

How do I deselect all cells in an NSBrowser

How do I deselect/unselect any selected cells in an NSBrowser?
Redwood
  • 66,744
  • 41
  • 126
  • 187
0
votes
1 answer

How to use NSBrowserDelegate on 10.5

I have a question: When I was running the sample code SimpleCocoaBrowser, I received a crash report about the NSBrowserDelegate, which I discovered can only be used after 10.6. So how can I use an NSBrowser in 10.5? Just use the NSBrowser without…
Tr4work
  • 11
0
votes
1 answer

How to traverse forward and backwards in NSBrowser?

I am trying to create something similar to the OS X finder. How can I go backwards and forwards like in OS X finder? I'm not sure which methods to call to do this.
Sheehan Alam
  • 60,111
  • 124
  • 355
  • 556
0
votes
0 answers

How to get a cell's frame in hitTestForEvent method in the NSBrowserCell subclass?

How do I get the button's rect in this method? In the below method the NSRect buttonRect = ??? is the place where I need to get the frame / rect of NSButtonCell object named _buttonCell. - (NSCellHitResult)hitTestForEvent:(NSEvent *)event …
Anoop Vaidya
  • 46,283
  • 15
  • 111
  • 140
0
votes
1 answer

NSBrowser selection of row and action of NSBrowserCell

I am having an NSBrowser in one of my windows. It has a checkbox, image and textbox as you see in the screenshot. I am struggling to do two things: Change the row selection color. By default it is blue. Action on the checkbox The checkbox + image…
Anoop Vaidya
  • 46,283
  • 15
  • 111
  • 140
0
votes
1 answer

How do I add custom cell in NSBrowser?

I need to add a custom cell that will have a checkbox i.e. NSButton and an NSImageCell. I searched and found I need to override NSBrowserCell to achieve this, but the delegate method doesn't return any NSView or NSCell as it does in NSTableView. The…
Anoop Vaidya
  • 46,283
  • 15
  • 111
  • 140
0
votes
0 answers

Making NSBrowser usable when it's updating

I have an NSBrowser which displays 2 columns of data that is calculated on several other threads while my app is running. The problem I'm trying to solve is to allow the user to interact with the browser while the data is still coming in. Right now,…
user1118321
  • 25,567
  • 4
  • 55
  • 86
0
votes
1 answer

Finder-like Browser View

I have an App that lets the user choose a Browser, or Column View, much like Finder. Since it allows the user to browse a Backup, I'd love to have something like the Finder has in Column view. You select a file, and it shows details about it in the…
Tristan
  • 3,058
  • 6
  • 40
  • 68
0
votes
1 answer

How to use NSBrowserDelegate methods to represent data tree

I am trying to represent a JSON dictionary in an NSBrowser on OS X 10.11. I have a dictionary which contains members of either string values, arrays of string values, or dictionaries of the same. At func rootItemForBrowser(browser: NSBrowser) ->…
Ricky
  • 3,101
  • 1
  • 25
  • 33
0
votes
1 answer

Start editing first column of NSBrowser

AppKit's NSBrowser appears to have a bug where the method */ - (void)editItemAtIndexPath:(NSIndexPath *)indexPath withEvent:(NSEvent *)theEvent select:(BOOL)select doesn't work for the first column in the browser. If indexPath is pointing to an item…
Jacob Gorban
  • 1,431
  • 1
  • 9
  • 15
0
votes
1 answer

NSBrowser with sections like Finder in OS X 10.8+

I have a little problem wich - actually - becomes a bigger problem for me. I want to use a NSBrowser and group the rows in each column. The groups should at least separated by a line or a headline. Equal to the finder in OS X 10.8+, if you switch to…
0
votes
2 answers

How to click the segmentedControl object and use it to change view?

I want to implement just like interface builder segmented control, and click it to change views , I don't know under the segment if a NSBrowser or not. and how to change the view , can you give me some sample codes or a demo? Thank you very much!
jin
  • 2,145
  • 5
  • 27
  • 44