ImageEn, unit imageenview

TImageEnView.FitMode

TImageEnView.FitMode


Declaration

property FitMode: TIEFitMode;


Description

Specifies whether to fit the image to the control width, height or both when using AutoShrink and AutoStretch.

Value Description Equivalent To
iefmBoth Fit to width and height Fit
iefmWidth Fit to width only FitToWidth
iefmHeight Fit to height only FitToHeight

Note: Changes will not take effect until you call Update. To make it automatically update, add iedoDisableAutoFitWhenZoom to DisplayOptions

Default: iefmBoth


Examples

// Fit images to control
ImageEnView1.FitMode := iefmBoth;
ImageEnView1.AutoShrink  := True;
ImageEnView1.AutoStretch := True;
ImageEnView1.Update();

// Fit images to control width
ImageEnView1.FitMode := iefmWidth;
ImageEnView1.AutoShrink  := True;
ImageEnView1.AutoStretch := True;
ImageEnView1.Update();

// Fit images to control height
ImageEnView1.FitMode := iefmHeight;
ImageEnView1.AutoShrink  := True;
ImageEnView1.AutoStretch := True;
ImageEnView1.Update();


See Also

AutoShrink
AutoStretch
Fit
FitCropping