On Nov 10, 2009, at 4:55 PM, John Fox wrote: > Hello Nice Cocoa People: > > I'd like to be able to create an IKImageBrowserView that only displays a > single row of items that scrolls horizontally as needed. I didn't find any > public API for doing this, even though (from what I understand at least) > IKImageBrowserView uses NSCollectionView which has the > setMaxiumumNumberOfRows: method. Is there some public way of accessing an > IKImageBrowserViews's underlying NSCollectionView instance? Otherwise, is > there some trick I'm missing? Someone suggested that I could programmatically > set the size of by image browser view based on the cell size and the number > of items, which I imagine would work, but I'm wondering if there's an easier > way. > > Any help greatly appreciated.
Set the height of your browser view to whatever you'd like that will contain a single row of your image cells. Then in your controller's -awakeFromNib use [imageBrowser setContentResizingMask:NSViewWidthSizable] to tell it you only want it to expand horizontally. Apparently the default is NSViewHeightSizable and I see no way to override that via IB. The normal autosizing springs/struts in IB don't seem to affect the contentResizingMask at all for an IKImageBrowserView. Ashley _______________________________________________ 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: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com