ImageEn, unit iemview

TImageEnMView.Style

TImageEnMView.Style


Declaration

property Style: TIEMStyle;


Description

Specifies the thumbnail style.
If AutoAdjustStyle = True, then setting Style will automatically call SetStyleEx to adjust text, column count and spacing.

Value Description
iemsFlat Thumbnail with optional text above and below
iemsLargeFlat Same as iemsFlat but at double size (i.e. Zoom is 200%)
iemsFlatAndWide Thumbnail on the left with up to three lines of text on the right
iemsColumns Separate columns are used for thumbnails and text fields
iemsFilenames Small icon with a single line of text on the right


iemsFlat and iemsLargeFlat

The default view of TImageEnMView is a thumbnail with text below (and optionally above). The size of the thumbnail is specified by ThumbWidth and ThumbHeight.
Above the thumbnail, text is displayed if specified for ImageTopText. Below the thumbnail text can be specified by ImageInfoText and finally, ImageBottomText.
iemsLargeFlat is the same as iemsFlat but the thumbnail is shown at double size Zoom is 200%).




iemsFlatAndWide

Displays a thumbnail on the left with up to three rows of text. Text is displayed in this order
ImageTopText
ImageInfoText
ImageBottomText

The width of the text block is specified by TextBlockWidth, and spacing of the text by TextMargin.
This style works best with Zoom set to 50%.




iemsFilenames

In iemsFilenames mode, only one line of text is shown. The text will be the first valid text from: ImageBottomText, ImageTopText or ImageInfoText.
The width of the text block is specified by TextBlockWidth.
This style tends to work best with thumbnails zoomed to 24 pixels (i.e. ImageEnMView1.Zoom := -24;) and icons instead of thumbnails (Add ietxOnlyShowIcons to ImageEnMView1.ThumbnailOptionsEx).




iemsColumns

Displays a thumbnail on the left, with one to three text columns.
Columns will be shown for text fields which have text specified (e.g. using DefaultTopText) and a valid width. Columns are displayed in the order: DefaultTopText, DefaultBottomText, DefaultInfoText.
A header row is always displayed, which uses InfoTextFont for the font formatting. However, this can be overriden in the OnGetTextEx event. The header row caption is based on the default text, but can be overriden in OnGetText or OnGetTextEx.
This style tends to work best with thumbnails zoomed to 24 pixels (i.e. ImageEnMView1.Zoom := -24;) and icons instead of thumbnails (Add ietxOnlyShowIcons to ImageEnMView1.ThumbnailOptionsEx).



TImageEnMView Default: iemsFlat
TImageEnFolderMView Default: iemsFlat
TImageEnLayerMView Default: iemsFlatAndWide


Examples

// Show columns of thumbnails
ImageEnMView1.AutoAdjustStyle := True;
ImageEnMView1.Style := iemsFlat;

// Or more complex method...
ImageEnMView1.LockUpdate();
try
  ImageEnMView1.Style                 := iemsFlat;
  ImageEnMView1.Zoom                  := 100;
  ImageEnMView1.TopTextFont.Style     := [];
  ImageEnMView1.DefaultTopText        := iedtNone;
  ImageEnMView1.DefaultInfoText       := iedtNone;
  ImageEnMView1.DefaultBottomText     := iedtFileName;
  ImageEnMView1.ThumbnailsBorderWidth := 1;
  ImageEnMView1.VertBorder            := 8;
  ImageEnMView1.HorizBorder           := 8;
finally
  ImageEnMView1.UnlockUpdate();
end;



// Show file details
ImageEnMView1.AutoAdjustStyle := True;
ImageEnMView1.Style := iemsFlatAndWide;

// Or more complex method...
ImageEnMView1.LockUpdate();
try
  ImageEnMView1.Style                 := iemsFlatAndWide;
  ImageEnMView1.Zoom                  := 50;
  ImageEnMView1.TopTextFont.Style     := [ fsBold ];
  ImageEnMView1.DefaultTopText        := iedtFileName;
  ImageEnMView1.DefaultInfoText       := iedtFilePath;
  ImageEnMView1.DefaultBottomText     := iedtImageDimAndSize;
  ImageEnMView1.ThumbnailsBorderWidth := 1;
  ImageEnMView1.VertBorder            := 8;
  ImageEnMView1.HorizBorder           := 8;
finally
  ImageEnMView1.UnlockUpdate();
end;



// Show columns
ImageEnMView1.AutoAdjustStyle := True;
ImageEnMView1.Style := iemsColumns;

// Or more complex method...
ImageEnMView1.LockUpdate();
try
  ImageEnMView1.Style                 := iemsColumns;
  ImageEnMView1.Zoom                  := -24;
  ImageEnMView1.TopTextFont.Style     := [];
  ImageEnMView1.DefaultTopText        := iedtFileName;
  ImageEnMView1.DefaultInfoText       := iedtImageDimAndSize;
  ImageEnMView1.DefaultBottomText     := iedtFileCreateDate;
  ImageEnMView1.ThumbnailsBorderWidth := 0;
  ImageEnMView1.VertBorder            := 0;
  ImageEnMView1.HorizBorder           := 0;
finally
  ImageEnMView1.UnlockUpdate();
end;



// Show file list
ImageEnMView1.AutoAdjustStyle := True;
ImageEnMView1.Style := iemsFilenames;

// Or more complex method...
ImageEnMView1.LockUpdate();
try
  ImageEnMView1.Style                 := iemsFilenames;
  ImageEnMView1.Zoom                  := -24;
  ImageEnMView1.TopTextFont.Style     := [];
  ImageEnMView1.DefaultTopText        := iedtNone;
  ImageEnMView1.DefaultInfoText       := iedtNone;
  ImageEnMView1.DefaultBottomText     := iedtFileName;
  ImageEnMView1.ThumbnailsBorderWidth := 0;
  ImageEnMView1.VertBorder            := 0;
  ImageEnMView1.HorizBorder           := 0;
finally
  ImageEnMView1.UnlockUpdate();
end;



Demo

Demo  Demos\Multi\MViewStyles\MViewStyles.dpr


Compatibility Information

The style iemsACD was removed in v12.0.0. iemsFlat should be used instead. It has an equivalent layout, but excludes the dated 3D appearance.


See Also

SetStyleEx
AutoAdjustStyle
SetModernStyling
TextBlockWidth
TImageEnLayerMView.Style