vcl-cximage-dot-tcxcustomimageproperties-1c2de5e0.md
Specifies how the image editor fits and positions an image.
property FitMode: TcxImageFitMode read; write; default ifmFit;
| Type | Default | Description |
|---|---|---|
| TcxImageFitMode | ifmFit |
The active image fit mode.
|
Use the FitMode property to switch between available image display modes.
ifmFit (default)
An image is not resized if it fits into the editor’s boundaries. Otherwise, the image shrinks proportionally to fit into the editor.
An image is not resized to fit into the editor’s boundaries. In this mode, the editor displays a zoom track bar if the editor’s ZoomingOptions.ShowZoomTrackBar property is set to True. If the zoom track bar is hidden, users can still rotate the mouse wheel while holding the Ctrl key to zoom the displayed image in or out.
In addition, the editor displays scroll bars that allow users to pan the displayed image when it does not fit into the editor and the Center property is set to False. If the Center property is set to True ( default ), the image is always centered and scroll bars are hidden.
A centered image is stretched or shrunk to fill the editor. The image maintains its aspect ratio and can leave blank areas within the image editor.
Refer to the TcxImageFitMode type description for detailed information on all available options.
The FitMode property’s default value is ifmFit.
See Also
TcxCustomImageProperties.Center Property
TcxCustomImage.ZoomingOptions Property
TcxCustomImageProperties Class