ImageEn, unit iemview

TImageEnMView.TextColumnWidths

TImageEnMView.TextColumnWidths


Declaration

property TextColumnWidths[Col : TIEMTextPos] : Integer;


Description

Specifies the width of each column when Style is set to iemsColumns.



With the iemsColumns display style, data is shown in four columns:
Thumbnail
DefaultTopText
DefaultBottomText
DefaultInfoText

The width of the thumbnail is set by ThumbWidth whereas the width of each column can be specified by TextColumnWidths. If a column width is set to -1, then it will be automatically calculated. TextColumnWidths set to zero will be hidden (also if the text is set to iedtNone).

Note:
Column widths will automatically be adjusted if they are too wide to fit in the available area
Users can also manually resize column widths by clicking the header area with the mouse


Examples

// Display to the full width of the control with each column width auto-calculated
ImageEnMView1.LockUpdate();
ImageEnMView1.Style := iemsColumns;
ImageEnMView1.TextBlockWidth := -1;
ImageEnMView1.TextColumnWidths[ iemtpTop ]    := -1;
ImageEnMView1.TextColumnWidths[ iemtpBottom ] := -1;
ImageEnMView1.TextColumnWidths[ iemtpInfo ]   := -1;
ImageEnMView1.UnlockUpdate();

// Display to the full width of the control with the first column 100 pixels wide, the center column hidden, and the last column width auto-calculated
ImageEnMView1.LockUpdate();
ImageEnMView1.Style := iemsColumns;
ImageEnMView1.TextBlockWidth := -1;
ImageEnMView1.TextColumnWidths[ iemtpTop ]    := 100;
ImageEnMView1.TextColumnWidths[ iemtpBottom ] := -1;
ImageEnMView1.TextColumnWidths[ iemtpInfo ]   := 0;
ImageEnMView1.UnlockUpdate();

// Display to a total width of 300 with each column width auto-calculated
ImageEnMView1.LockUpdate();
ImageEnMView1.Style := iemsColumns;
ImageEnMView1.TextBlockWidth := 300;
ImageEnMView1.TextColumnWidths[ iemtpTop ]    := -1;
ImageEnMView1.TextColumnWidths[ iemtpBottom ] := -1;
ImageEnMView1.TextColumnWidths[ iemtpInfo ]   := -1;
ImageEnMView1.UnlockUpdate();

// Display to a total width of 300 with the first column 200 wide, and the remaining ones auto-calculated
ImageEnMView1.LockUpdate();
ImageEnMView1.Style := iemsColumns;
ImageEnMView1.TextBlockWidth := 300;
ImageEnMView1.TextColumnWidths[ iemtpTop ]    := 200;
ImageEnMView1.TextColumnWidths[ iemtpBottom ] := -1;
ImageEnMView1.TextColumnWidths[ iemtpInfo ]   := -1;
ImageEnMView1.UnlockUpdate();

// Display to a total width of 300 by setting specific widths for each column
ImageEnMView1.LockUpdate();
ImageEnMView1.Style := iemsColumns;
ImageEnMView1.TextBlockWidth := -1;
ImageEnMView1.TextColumnWidths[ iemtpTop ]    := 200;
ImageEnMView1.TextColumnWidths[ iemtpBottom ] := 50;
ImageEnMView1.TextColumnWidths[ iemtpInfo ]   := 50;
ImageEnMView1.UnlockUpdate();


Demo

Demo  Demos\Multi\MViewStyles\MViewStyles.dpr


See Also

TextBlockWidth
Style
TextColumns