Setting IKImageBrowserView to one long line

I have IKImageBrowserViewin NSScrollView, and I want to lay it out so that it only scrolls from left to right.

By default, IKImageBrowserViewdisplays images in the grid, and the width is correctly limited, but always increases the height to match the number of lines of images contained in it.

My naive approach to this was to try to set the frames IKImageBrowserViewand NSScrollViewso that the height was equivalent to 1 line of images, but this had no effect.

Can someone recommend the right way to approach this?

+3
source share
1 answer

As soon as I ask a question and I will find the answer:

[imageBrowser setContentResizingMask:NSViewWidthSizable];
+4
source

Source: https://habr.com/ru/post/1787054/


All Articles