Type Method

contentSizeForFrameSize:horizontalScrollerClass:verticalScrollerClass:borderType:controlSize:scrollerStyle:

Returns the content size calculated from the frame size and the specified specifications.

Declaration

+ (NSSize)contentSizeForFrameSize:(NSSize)fSize horizontalScrollerClass:(Class)horizontalScrollerClass verticalScrollerClass:(Class)verticalScrollerClass borderType:(NSBorderType)type controlSize:(NSControlSize)controlSize scrollerStyle:(NSScrollerStyle)scrollerStyle;

Parameters

frameSize

The frame size in screen coordinates.

horizontalScrollerClass

The class used as the horizontal scroller. A value of nil specifies that no horizontal scroller is used.

verticalScrollerClass

The class used as the vertical scroller. A value of nil specifies that no horizontal scroller is used.

borderType

Specifies the appearance of the style of the scroll view’s border. See NSBorderType for a list of possible values.

controlSize

The control size. The possible values are specified in NSControlSize. NSMiniControlSize is not supported.

scrollerStyle

Specifies the scroll style. See NSScrollerStyle for supported values.

Return Value

The content view frame size.

Discussion

For an existing scroll view, you can simply use the contentSize property.

See Also

Calculating Layout

+ frameSizeForContentSize:horizontalScrollerClass:verticalScrollerClass:borderType:controlSize:scrollerStyle:

Returns the frame size of a scroll view that contains a content view with the specified size.