Declaration
property OnShowDialog: TOnShowDialogEvent;
Description
Occurs whenever an ImageEn dialog is displayed, such as Print Preview, Layer Properties, etc.
It can be used to customize the controls and styling of the dialog.
Values of
DlgType with
TImageEnView.OnShowDialog:
Item | Form | Unit | Notes |
iefLayerProperties | TIELayerPropertiesDlg | iexLayerPropsForm | When properties are displayed for a selected layer using LayersShowPropertiesDialog or LayersNewLayerDialog. Use the IELayerProps control to reference the embedded TIELayerProps |
iefBrushProperties | TIEBrushProps | iexBrushProps | When properties are displayed for brush, clone or retouch brushes using BrushShowPropertiesDialog |
iefProcPreview | TfPreviews | previews | When editing image colors and effects using DoPreviews |
iefPrintPreview | TfiePrnForm2 | iePrnForm2 | When previewing image printing from a TImageEnView using DoPrintPreviewDialog (with dialog type set to iedtDialog) |
iefMaxiPrintPreview | TfiePrnForm1 | iePrnForm1 | When previewing image printing from a TImageEnView using DoPrintPreviewDialog (with dialog type set to iedtMaxi) |
iefIOPreview | TfIOPreviews | iopreviews | Preview of saving properties in TSaveImageEnDialog, DoPreviews or DoPreviews |
iefAcquireSource | TIEAcquireForm | iexAcquireForm | Selection of an acquisition source using SelectSource |
Values of
DlgType with
TImageEnMView.OnShowDialog:
Item | Form | Unit | Notes |
iefMultiPrintPreview | TfiePrnForm3 | iePrnForm3 | When previewing image printing from a TImageEnMView using DoPrintPreviewDialog |
iefIOPreview | TfIOPreviews | iopreviews | Preview of saving properties in TSaveImageEnDialog, DoPreviews or DoPreviews |
iefAcquireSource | TIEAcquireForm | iexAcquireForm | Selection of an acquisition source using SelectSource |
iefMultiSavePreview | TfiePrnForm4 | iePrnForm4 | When previewing contact sheet saving from a TImageEnMView using DoSavePreviewDialog |
TIELayerPropertiesDlg
TfPreviews
TfiePrnForm2
TfiePrnForm1
TfiePrnForm3
TfIOPreviews
TIEAcquireForm
TfiePrnForm4
TIEBrushProps
// Hide the progress bar in the IO Previews dialog (add iopreviews to uses)
procedure TForm1.ImageEnView1ShowDialog(Sender: TObject; DlgType: TIEDlgType; Form: TForm);
begin
if DlgType = iefIOPreview then
TfIOPreviews(Form).ProgressBar1.Visible := False;
end;
// Do not show text descriptions for shapes in the Layer Properties dialog and change color to clYellow (add iexLayerPropsForm to uses)
procedure Tfmain.ImageEnView1ShowDialog(Sender: TObject; DlgType: TIEDlgType; Form: TForm);
begin
if DlgType = iefLayerProperties then
begin
TIELayerPropertiesDlg(Form).IELayerProps.ComboBoxShowText := False;
TIELayerPropertiesDlg(Form).IELayerProps.ComboBoxShapeColor := clYellow;
TIELayerPropertiesDlg(Form).IELayerProps.GradientColor1 := clYellow;
TIELayerPropertiesDlg(Form).IELayerProps.GradientColor2 := clGreen;
end;
end;
// Hide the "General" tab of the Layer Properties dialog (add iexLayerPropsForm to uses)
// Tabs of TIELayerPropertiesDlg: tabGeneral, tabStyle, tabShape, tabLine, tabText, tabAngle, tabAdvanced
procedure TForm1.ImageEnView1ShowDialog(Sender: TObject; DlgType: TIEDlgType; Form: TForm);
begin
if DlgType = iefLayerProperties then
TIELayerPropertiesDlg(Form).IELayerProps.Frame.tabGeneral.TabVisible := False;
end;
// Use a multi-line page control in the Proc Previews dialog (add previews to uses)
procedure TForm1.ImageEnView1ShowDialog(Sender: TObject; DlgType: TIEDlgType; Form: TForm);
begin
if DlgType = iefProcPreview then
TfPreviews(Form).PageControl1.MultiLine := True;
end;
// Prevent asymmetrical brushes by disabling the "Lock" checkbox (add iexBrushProps to uses)
procedure TForm1.ImageEnView1ShowDialog(Sender: TObject; DlgType: TIEDlgType; Form: TForm);
begin
if DlgType = iefBrushProperties then
TIEBrushProps(Form).chkLink.Enabled := False;
end;
// Advanced customizing of the Proc Preview dialog (add previews to uses)
procedure TForm1.ImageEnView1ShowDialog(Sender: TObject; DlgType: TIEDlgType; Form: TForm);
begin
if DlgType <> iefProcPreview then
exit;
with TfPreviews(Form) do
begin
// Red dialog
Color := clRed;
// Caption of OK button
OkButton.Caption := 'Oh Yeah';
// Replace cancel button with custom control
CancelButton.Visible := False;
With TMyAnimatedButton.Create( PreviewForm ) do
begin
Parent := PreviewForm;
Left := CancelButton.Left;
Top := CancelButton.Top + CancelButton.Height + 8;
Width := CancelButton.Width;
Height := CancelButton.Height;
Anchors := [akTop, akRight];
Caption := 'My Cancel';
ModalResult := 2;
end;
end;
end;
// Add own glyphs in the Source Selection ListBox (add iexAcquireForm to uses)
procedure TForm1.ImageEnView1ShowDialog(Sender: TObject; DlgType: TIEDlgType; Form: TForm);
begin
if DlgType = iefAcquireSource then
begin
bmp := TIEBitmap.create;
TIEAcquireForm(Form).imlDevices.Clear();
TIEAcquireForm(Form).Height := 16;
TIEAcquireForm(Form).Width := 16;
bmp.LoadFromFile( 'SCANNER.png' );
bmp.AddToImageList( ImageList );
bmp.LoadFromFile( 'CAMERA.png' );
bmp.AddToImageList( ImageList );
bmp.LoadFromFile( 'DRIVE.png' );
bmp.AddToImageList( ImageList );
bmp.LoadFromFile( 'PHONE.png' );
bmp.AddToImageList( ImageList );
bmp.Free;
end;
end;
See Also
◼OnPreview
◼OnIOPreview
◼OnDoPreviews