TaskDialog: add OnExpand event (native Windows dialog only).

This commit is contained in:
Bart 2023-08-01 11:06:09 +02:00
parent 13d54fc4cb
commit 213b32e0c7
2 changed files with 6 additions and 1 deletions

View File

@ -638,6 +638,7 @@ type
FOnDialogConstructed: TNotifyEvent; FOnDialogConstructed: TNotifyEvent;
FOnDialogCreated: TNotifyEvent; FOnDialogCreated: TNotifyEvent;
FOnDialogDestroyed: TNotifyEvent; FOnDialogDestroyed: TNotifyEvent;
FOnExpand: TNotifyEvent;
FOnVerificationClicked: TNotifyEvent; FOnVerificationClicked: TNotifyEvent;
FQueryChoices: TStrings; FQueryChoices: TStrings;
FQueryResult: String; FQueryResult: String;
@ -693,6 +694,7 @@ type
property OnDialogCreated: TNotifyEvent read FOnDialogCreated write FOnDialogCreated; property OnDialogCreated: TNotifyEvent read FOnDialogCreated write FOnDialogCreated;
property OnDialogDestroyed: TNotifyEvent read FOnDialogDestroyed write FOnDialogDestroyed; property OnDialogDestroyed: TNotifyEvent read FOnDialogDestroyed write FOnDialogDestroyed;
property OnVerificationClicked: TNotifyEvent read FOnVerificationClicked write FOnVerificationClicked; property OnVerificationClicked: TNotifyEvent read FOnVerificationClicked write FOnVerificationClicked;
property OnExpand: TNotifyEvent read FOnExpand write FOnExpand;
end; end;
TTaskDialog = class(TCustomTaskDialog) TTaskDialog = class(TCustomTaskDialog)
@ -721,6 +723,7 @@ type
property OnDialogCreated; property OnDialogCreated;
property OnDialogDestroyed; property OnDialogDestroyed;
property OnVerificationClicked; property OnVerificationClicked;
property OnExpand;
end; end;
const const

View File

@ -1709,7 +1709,9 @@ begin
end; end;
TDN_EXPANDO_BUTTON_CLICKED: TDN_EXPANDO_BUTTON_CLICKED:
begin begin
if IsConsole then writeln('ToDo: implement OnExpanded'); Assert((Dlg is TCustomTaskDialog),'TaskDialogCallbackProc: dwRefData is NOT a TCustomTaskDialog');
if Assigned(Dlg.OnExpand) then
Dlg.OnExpand(Dlg);
end; end;
end; end;
end; end;