Размещать свои элементы управления в диалоге печати

{codecitation class=»brush: pascal; gutter: false;» width=»600px»}

Оформил: DeeCo

Автор: http://www.swissdelphicenter.ch

// Unit for TExtendedPrintDialog

unit Unit1;

interface

uses

Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,

ExtDlgs, extctrls, stdctrls, CommDlg, Dlgs;

type

TExtendedPrintDialog = class(TPrintDialog)

private

fExtendedPanel: TPanel;

fCheckBoxOne,

fCheckBoxTwo: TCheckbox;

fButton: TButton;

protected

procedure DoShow; override;

function GetStaticRect: TRect;

function TaskModalDialog(DialogFunc: Pointer; var DialogData): Bool;

override;

public

constructor Create(AOwner: TComponent); override;

function Execute: Boolean; override;

end;

implementation

constructor TExtendedPrintDialog.Create(AOwner: TComponent);

var

iTop: Integer;

begin

inherited;

fExtendedPanel := TPanel.Create(Self);

with fExtendedPanel do

begin

Name := ‘ExtendedPanel’;

Caption := »;

SetBounds(0, 0, 169, 200); // (204, 5, 169, 200);

BevelOuter := bvNone;

BorderWidth := 6;

TabOrder := 1;

fButton := TButton.Create(Self);

with fButton do

begin

Name := ‘SomeButton’;

Caption := ‘

Добавить комментарий