Docs: LCL/extdlgs. Updates content in the TOpenPictureDialog.UpdatePreview topic. Includes changes in ecdfb3df.

This commit is contained in:
dsiders 2025-04-13 19:17:33 -04:00
parent ecdfb3dfe3
commit 9e823adba9

View File

@ -428,37 +428,41 @@ the caption displayed in the dialog. ClearPreview is called from the
<element name="TOpenPictureDialog.UpdatePreview"> <element name="TOpenPictureDialog.UpdatePreview">
<short> <short>
<var>UpdatePreview</var> - updates the preview image, implementing any Loads the preview image for the current file name, or clears the preview
pending changes. image when the file is not usable.
</short> </short>
<descr> <descr>
<p> <p>
<var>UpdatePreview</var> is a procedure used to update the file name and <var>UpdatePreview</var> is a procedure used to update the preview image file
image used in the preview dialog. Please note: No actions are needed or name and the image caption for the open picture dialog. The preview image file
performed in the method when FileName has the same value as PreviewFileName. name is based on the current value in the FileName property. No actions are
performed in the method if the preview image file name already contains the
value in FileName.
</p> </p>
<p> <p>
The <var>FileName</var> property is assigned to <var>PreviewFileName</var>, FileName must be a valid qualified path on the local file system, and have
which is used as the source for the content displayed in read permissions. The image file is loaded into the <var>ImageCtrl</var>
<var>ImageCtrl</var>. FileName must be a valid file name on the local file on the dialog. The caption in <var>PictureGroupBox</var> is updated to display
system, and have read permissions. PreviewFileName is loaded into the picture the Width and Height for the stored image in the format <b>'(%dx%d)'</b>
for the ImageCtrl, and the caption in <var>PictureGroupBox</var> is updated (Width x Height).
to display the Width and Height for the stored image in the format
<b>'(%dx%d)'</b>.
</p> </p>
<p> <p>
If the file is not successfully loaded (due to permissions or image format), The <var>ClearPreview</var> method is called if the file path or name is not
the <var>ClearPreview</var> method is called. valid, not successfully loaded (due to permissions or image format), or the
PictureGroupBox is not used for the platform (as with Windows Vista and later
versions where the preview image is natively supported).
</p> </p>
<p> <p>
UpdatePreview is called from the <var>DoSelectionChange</var> method when the UpdatePreview is called from the <var>DoSelectionChange</var> method when the
selected file name for the preview dialog has changed. selected file name for the preview dialog has changed. It is executed before
an assigned OnSelectionChange event handler for the dialog.
</p> </p>
</descr> </descr>
<seealso> <seealso>
<link id="TOpenPictureDialog.ImageCtrl"/> <link id="TOpenPictureDialog.ImageCtrl"/>
<link id="TOpenPictureDialog.PictureGroupBox"/> <link id="TOpenPictureDialog.PictureGroupBox"/>
<link id="TOpenPictureDialog.ClearPreview"/> <link id="TOpenPictureDialog.ClearPreview"/>
<link id="#lcl.dialogs.TOpenDialog.OnSelectionChange">TOpenDialog.OnSelectionChange</link>
<link id="#lcl.dialogs.TFileDialog.FileName">TFileDialog.FileName</link> <link id="#lcl.dialogs.TFileDialog.FileName">TFileDialog.FileName</link>
</seealso> </seealso>
</element> </element>