Re: Is NSCollectionView size not controllable in 10.10?
Re: Is NSCollectionView size not controllable in 10.10?
- Subject: Re: Is NSCollectionView size not controllable in 10.10?
- From: Rob Petrovec <email@hidden>
- Date: Sun, 06 Nov 2016 19:34:06 -0700
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 <email@hidden> wrote:
>
> On Nov 4, 2016, at 02:56:27, Jean-Daniel <email@hidden> 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 (email@hidden)
>
> 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:
>
> This email sent to email@hidden
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden