I haven’t seen Jean-Daniel’s reply (he likely replied directly to you), but I 
think he is correct.  Your best bet is to subclass NSCollectionViewFlowLayout 
and override -collectionViewContentSize: to specify what width you want the 
collection view to be and let NSCollectionViewFlowLayout figure out where the 
items go within that width or do your own layout by overriding 
-layoutAttributesForElementsInRect: & -layoutAttributesForItemAtIndexPath:  
Good luck...

—Rob


> On Nov 4, 2016, at 10:01 PM, Steve Mills <sjmi...@mac.com> wrote:
> 
> On Nov 4, 2016, at 02:56:27, Jean-Daniel <d...@xenonium.com> wrote:
>> 
>> I don’t get it. NSCollectionView is a very flexible class. If you are not 
>> happy with the default flow layout, just write your own.
>> 
>> From the reference: 
>> "    • The layout object specifies the position and appearance of items 
>> onscreen. AppKit defines layout objects that you can use as-is, but you can 
>> also define custom layouts by subclassing NSCollectionViewLayout. »
> 
> Write my own? It might come to that, but it won't help NSCollectionView's 
> laughable implementation of shift-arrowKey and shift-click selection. And I 
> shouldn't have to, really, since NSCollectionView is supposed to be The Way 
> To Do Stuff.
> 
> But that doesn't help with my question. It clearly knows how to activate the 
> horizontal scrollbar when you resize the window. It activates for a bit 
> before it reshuffles things around to fit the new size, then deactivates it 
> again. There's no way to make it just stay that width?
> 
> --
> Steve Mills
> Drummer, Mac geek
> 
> 
> _______________________________________________
> 
> Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
> 
> Please do not post admin requests or moderator comments to the list.
> Contact the moderators at cocoa-dev-admins(at)lists.apple.com
> 
> Help/Unsubscribe/Update your Subscription:
> https://lists.apple.com/mailman/options/cocoa-dev/petrock%40mac.com
> 
> This email sent to petr...@mac.com


_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to