mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-09 18:08:35 +02:00
TaskDialog: handle the paramters in DoOnExpandButtonClicked and DoOnVerificationClicked.
Rename event OnExpand to OnExpanded, as it is in Delphi.
This commit is contained in:
parent
a8b8ec1b70
commit
396b72b21a
@ -630,6 +630,7 @@ type
|
|||||||
FCommonButtons: TTaskDialogCommonButtons;
|
FCommonButtons: TTaskDialogCommonButtons;
|
||||||
FDefaultButton: TTaskDialogCommonButton;
|
FDefaultButton: TTaskDialogCommonButton;
|
||||||
FExpandButtonCaption: TTranslateString;
|
FExpandButtonCaption: TTranslateString;
|
||||||
|
FExpanded: Boolean;
|
||||||
FExpandedText: TTranslateString;
|
FExpandedText: TTranslateString;
|
||||||
FFlags: TTaskDialogFlags;
|
FFlags: TTaskDialogFlags;
|
||||||
FFooterIcon: TTaskDialogIcon;
|
FFooterIcon: TTaskDialogIcon;
|
||||||
@ -639,7 +640,7 @@ type
|
|||||||
FOnDialogConstructed: TNotifyEvent;
|
FOnDialogConstructed: TNotifyEvent;
|
||||||
FOnDialogCreated: TNotifyEvent;
|
FOnDialogCreated: TNotifyEvent;
|
||||||
FOnDialogDestroyed: TNotifyEvent;
|
FOnDialogDestroyed: TNotifyEvent;
|
||||||
FOnExpand: TNotifyEvent;
|
FOnExpanded: TNotifyEvent;
|
||||||
FOnHyperlinkClicked: TNotifyEvent;
|
FOnHyperlinkClicked: TNotifyEvent;
|
||||||
FOnRadioButtonClicked: TNotifyEvent;
|
FOnRadioButtonClicked: TNotifyEvent;
|
||||||
FOnTimer: TTaskDlgTimerEvent;
|
FOnTimer: TTaskDlgTimerEvent;
|
||||||
@ -707,12 +708,13 @@ type
|
|||||||
property VerificationText: TTranslateString read FVerificationText write FVerificationText;
|
property VerificationText: TTranslateString read FVerificationText write FVerificationText;
|
||||||
property Width: Integer read FWidth write FWidth default 0;
|
property Width: Integer read FWidth write FWidth default 0;
|
||||||
property URL: String read FURL;
|
property URL: String read FURL;
|
||||||
|
property Expanded: Boolean read FExpanded;
|
||||||
property OnButtonClicked: TTaskDlgClickEvent read FOnButtonClicked write FOnButtonClicked;
|
property OnButtonClicked: TTaskDlgClickEvent read FOnButtonClicked write FOnButtonClicked;
|
||||||
property OnDialogConstructed: TNotifyEvent read FOnDialogConstructed write FOnDialogConstructed;
|
property OnDialogConstructed: TNotifyEvent read FOnDialogConstructed write FOnDialogConstructed;
|
||||||
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;
|
property OnExpanded: TNotifyEvent read FOnExpanded write FOnExpanded;
|
||||||
property OnTimer: TTaskDlgTimerEvent read FOnTimer write FOnTimer;
|
property OnTimer: TTaskDlgTimerEvent read FOnTimer write FOnTimer;
|
||||||
property OnRadioButtonClicked: TNotifyEvent read FOnRadioButtonClicked write FOnRadioButtonClicked;
|
property OnRadioButtonClicked: TNotifyEvent read FOnRadioButtonClicked write FOnRadioButtonClicked;
|
||||||
property OnHyperlinkClicked: TNotifyEvent read FOnHyperlinkClicked write FOnHyperlinkClicked;
|
property OnHyperlinkClicked: TNotifyEvent read FOnHyperlinkClicked write FOnHyperlinkClicked;
|
||||||
@ -744,7 +746,7 @@ type
|
|||||||
property OnDialogCreated;
|
property OnDialogCreated;
|
||||||
property OnDialogDestroyed;
|
property OnDialogDestroyed;
|
||||||
property OnVerificationClicked;
|
property OnVerificationClicked;
|
||||||
property OnExpand;
|
property OnExpanded;
|
||||||
property OnTimer;
|
property OnTimer;
|
||||||
property OnRadioButtonClicked;
|
property OnRadioButtonClicked;
|
||||||
property OnHyperlinkClicked;
|
property OnHyperlinkClicked;
|
||||||
|
@ -197,10 +197,11 @@ begin
|
|||||||
FOnDialogDestroyed(Self);
|
FOnDialogDestroyed(Self);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TCustomTaskDialog.DoOnExpandButtonClicked({%H-}Expanded: Boolean);
|
procedure TCustomTaskDialog.DoOnExpandButtonClicked(Expanded: Boolean);
|
||||||
begin
|
begin
|
||||||
if Assigned(FOnExpand) then
|
FExpanded := Expanded;
|
||||||
FOnExpand(Self)
|
if Assigned(FOnExpanded) then
|
||||||
|
FOnExpanded(Self)
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TCustomTaskDialog.DoOnTimer(TickCount: Cardinal; var Reset: Boolean);
|
procedure TCustomTaskDialog.DoOnTimer(TickCount: Cardinal; var Reset: Boolean);
|
||||||
@ -209,8 +210,12 @@ begin
|
|||||||
FOnTimer(Self, TickCount, Reset);
|
FOnTimer(Self, TickCount, Reset);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TCustomTaskDialog.DoOnVerificationClicked({%H-}Checked: Boolean);
|
procedure TCustomTaskDialog.DoOnVerificationClicked(Checked: Boolean);
|
||||||
begin
|
begin
|
||||||
|
if Checked then
|
||||||
|
Include(FFlags, tfVerificationFlagChecked)
|
||||||
|
else
|
||||||
|
Exclude(FFlags, tfVerificationFlagChecked);
|
||||||
if Assigned(FOnVerificationClicked) then
|
if Assigned(FOnVerificationClicked) then
|
||||||
FOnVerificationClicked(Self);
|
FOnVerificationClicked(Self);
|
||||||
end;
|
end;
|
||||||
|
Loading…
Reference in New Issue
Block a user