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

View File

@ -1709,7 +1709,9 @@ begin
end;
TDN_EXPANDO_BUTTON_CLICKED:
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;