[Overview][Classes][Procedures and functions][Index] Reference for unit 'ExtDlgs' (#lcl)

TOpenPictureDialog.UpdatePreview

UpdatePreview - updates the preview image, implementing any pending changes.

Declaration

Source position: extdlgs.pas line 82

protected procedure TOpenPictureDialog.UpdatePreview; virtual;

Description

UpdatePreview is a procedure used to update the file name and image used in the preview dialog. Please note: No actions are needed or performed in the method when FileName has the same value as PreviewFileName.

The FileName property is assigned to PreviewFileName, which is used as the source for the content displayed in ImageCtrl. FileName must be a valid file name on the local file system, and have read permissions. PreviewFileName is loaded into the picture for the ImageCtrl, and the caption in PictureGroupBox is updated to display the Width and Height for the stored image in the format '(%dx%d)'.

If the file is not successfully loaded (due to permissions or image format), the ClearPreview method is called.

UpdatePreview is called from the DoSelectionChange method when the selected file name for the preview dialog has changed.

See also

TOpenPictureDialog.ImageCtrl

  

TImage used to preview the content in an image file.

TOpenPictureDialog.PictureGroupBox

  

PictureGroupBox - a groupbox related to a single picture ???

TOpenPictureDialog.ClearPreview

  

ClearPreview - clears the preview area.

TFileDialog.FileName

  

Contains the UTF-8-encoded name for a file chosen using the dialog.


Version 4.0 Generated 2025-05-03 Home