nscollectionviewitem

NSCollectionViewItem double-click action?

How do I set an action for when a user double clicks an NSCollectionViewItem. NSTableView, for example, has the setDoubleAction method. Is there something similar for NSCollectionView? Thanks ...

NSCollectionView draws nothing

I'm trying to set up an NSCollectionView (I have done this successfully in the past, but for some reason it fails this time). I have a model class called "TestModel", and it has an NSString property that just returns a string (just for testing purposes right now). I then have an NSMutableArray property declaration in my main app delegat...

Resize view of NSCollectionViewItem

How do I programatically set the size of a view of an NSCollectionViewItem? I tried doing this in an NSCollectionView subclass: @implementation CustomCollectionView - (NSCollectionViewItem *)newItemForRepresentedObject:(id)object { NSCollectionViewItem *newitem = [[self itemPrototype] copy]; [newitem setRepresentedObject:obje...

Redrawing NSCollectionView on Scroll Causes Breakup of Graphics

I have a minor irritant in an NSCollectionView in which the NSCollectionViewItem's break up visually when I scroll the window. The rate of breakup depends upon the rate of scrolling. For example, if I scroll slowly the breakup occurs more often. Fast scrolling less so. It appears that the problem is when the custom NSView of the NSColle...

CollectionViewItem Selection

I have an NSCollectionView. When I click on one of the actual collection view items it becomes selected. When I click on one of the controls on the view it doesn't. How do I tell the NSCollectionViewItem to set it's selected to YES when, for example, a check box is clicked on it's view? ...

Selection Highlight in NSCollectionView

On some occasions my head just hurts from banging it against the Cocoa wall. Today is one of those days. I have a working NSCollectionView with one minor, but critical, exception. Getting and highlighting the selected item within the collection. I've had all this working prior to Snow Leopard, but something appears to have changed and ...

want to remove a specific collectionview item with the remove button on that view

I have a collection view item and its prototype view. Within that prototype view I have a little x button. I want that button to remove the exact collection view item that it is on top of. I can remove a selected item if I click on the space around the x button but if I go straight to clicking the button before clicking the item it ...

Custom control in NSCollectionViewItem

I want to put a custom control inside the view for my NSCollectionViewItem. Lets say I have a custom NSView called BoxesView.BoxesView is just a view that draws a predetermined number of boxes in its view. That number of boxes is set in the init method. Lets say I set it to 8. When I load up the collection view, all the other controls ...