Type Method

frameSizeForContentSize:hasHorizontalScroller:hasVerticalScroller:borderType:

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

Declaration

+ (NSSize)frameSizeForContentSize:(NSSize)cSize hasHorizontalScroller:(BOOL)hFlag hasVerticalScroller:(BOOL)vFlag borderType:(NSBorderType)type;

Parameters

contentSize

The content size.

hFlag

Specifies if the scroll view has a horizontal scroller.

vFlag

Specifies if the scroll view has a vertical scroller.

borderType

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

Return Value

Returns the frame size.

Discussion

For an existing scroll view, you can simply use the frame method and extract its size.

See Also

Deprecated Methods

+ contentSizeForFrameSize:hasHorizontalScroller:hasVerticalScroller:borderType:

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

Deprecated