ImageEn, unit iemview

TImageEnMView.TextBlockWidth

TImageEnMView.TextBlockWidth


Declaration


property TextBlockWidth : integer;


Description


If Style is set to iemsFlatAndWide, iemsColumns or iemsFilenames then all text is shown on the right-hand side of the thumbnail.

iemsFlatAndWide:


iemsColumns:


TextBlockWidth specifies the width of the text block (Default: -1). If set to -1 then the value is automatic:
- If Style is iemsColumns then the width of all columns will match the width of the control (or the width of all column if custom widths have been set)
- If there is only one column (GridWidth = 1) it will match the width of the control
- If there are multiple columns it will be three times the width of the thumbnail

Notes:
- The actual TextBlockWidth will be automatically adjusted to ensure it fits within the display area
- If AutoAdjustStyle = True, then setting Style will automatically set TextBlockWidth


Example


// Display detail thumbnails to the width of the control
ImageEnMView1.LockUpdate();
ImageEnMView1.Style := iemsFlatAndWide;
ImageEnMView1.GridWidth := 1;
ImageEnMView1.TextBlockWidth := -1;
ImageEnMView1.UnlockUpdate();

// Display detail thumbnails 300 pixels wide
ImageEnMView1.LockUpdate();
ImageEnMView1.Style := iemsFlatAndWide;
ImageEnMView1.GridWidth := -1;
ImageEnMView1.TextBlockWidth := 300 - ImageEnMView1.ThumbWidth;
ImageEnMView1.UnlockUpdate();

// Display columns to the width of the control
ImageEnMView1.LockUpdate();
ImageEnMView1.Style := iemsColumns;
ImageEnMView1.TextBlockWidth := -1;
ImageEnMView1.UnlockUpdate();

// Display columns 300 pixels wide
ImageEnMView1.LockUpdate();
ImageEnMView1.Style := iemsColumns;
ImageEnMView1.TextBlockWidth := 300 - ImageEnMView1.ThumbWidth;
ImageEnMView1.UnlockUpdate();