ImageEn, unit ieview

TOnShowDialogEvent


Declaration

TOnShowDialogEvent = procedure(Sender: TObject; DlgType: TIEDlgType; Form: TForm) of object;


Description

Occurs when ImageEn dialogs are shown.

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





Examples

// 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(wForm) 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;

// Hide glyphs in the Source Selection ListBox (add iexAcquireForm to uses)
procedure TForm1.ImageEnView1ShowDialog(Sender: TObject; DlgType: TIEDlgType; Form: TForm);
begin
  if DlgType = iefAcquireSource then
    TIEAcquireForm(Form).imlDevices.Clear();
end;


See Also

OnShowDialog