GetMinimumSize Method

Determines the smallest non-scrolling control dimension that can be used to display a specified number of thumbnail boxes.

Applies To

Image Thumbnail control

Syntax

object.GetMinimumSize(ThumbCount, ScrollBar)

Arguments

Parameter

Data Type

Description

ThumbCount

Long

The number of thumbnail boxes desired in the non-scrolling direction.

ScrollBar

Boolean

Indicates whether or not the size value returned allows space for a scroll bar.

True -- Allows space for a scroll bar.
False -- Does not allow space for a scroll bar.


Return Value

Long

The minimum control size needed to accommodate the number of thumbnail boxes specified by the ThumbCount parameter.

Remarks

GetMinimumSize uses the current values of the ScrollDirection, ThumbHeight, and ThumbWidth properties to calculate this value.

GetMaximumSize and GetMinimumSize should be used together to determine a range of control sizes that allow for a display that fits the required number of thumbnails in the non-scrolling dimension.

A control size smaller than this dimension in the non-scrolling direction will contain space for fewer than the specified number of thumbnails.

Once a control size is determined (based on results of GetMaximumSize and GetMinimumSize), a call to the GetScrollDirectionSize method may be used to calculate the size required in the scrolling direction to display a specified number of thumbnails.

See Also

GetMaximumSize method

GetScrollDirectionSize method

ScrollDirection property

ThumbHeight property

ThumbWidth property