ImageEn, unit iemview

TImageEnMView.GridWidth

TImageEnMView.GridWidth


Declaration

property GridWidth: integer;


Description

GridWidth is the number of images per row. This property is active only when DisplayMode is mdGrid.

Valid GridWidth values are:
Value Description
-1 Automatically adjust column count to match the component width (standard usage)
0 Only one row
1 A single column of thumbnails
>1 Number of columns (images per row), e.g. set to 3 for three vertical columns

Note:
You can center the thumbnail column(s) using ThumbnailOptionsEx
If AutoAdjustStyle = True, then setting Style will automatically set GridWidth
You can use CalcGridWidth and CalcGridHeight to determine the current display count (due to window size)
If ThumbWidth is auto-calculated (-1), then GridWidth must be >= 1.

Default: -1


Example

// automatically adjust the column count to match the control width
ImageEnMView1.GridWidth := -1;


See Also

DisplayMode
CalcGridWidth
CalcGridHeight