mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-01 23:20:26 +02:00
TTaskDialog: add a comment why Execute always returns True.
This commit is contained in:
parent
033512d064
commit
f48fe7983e
@ -147,6 +147,10 @@ begin
|
||||
FQueryResult := '';
|
||||
ButtonID := TWSTaskDialogClass(WidgetSetClass).Execute(Self, ParentWnd, ARadioRes);
|
||||
FModalResult := ButtonIDToModalResult(ButtonID);
|
||||
//Note: this behaviour is inconsistent with all other dialogs, where a ModalResult of mrCancel would give a return value of False.
|
||||
//It also does not conform to Delhi's offial documentation
|
||||
//(https://docwiki.embarcadero.com/Libraries/Alexandria/en/Vcl.Dialogs.TCustomTaskDialog.Execute)
|
||||
//But it seems that Delphi in fact does the same: it will always return True, as long as we succeed in showing the dialog.
|
||||
Result := (ButtonID >= 0);
|
||||
if (ARadioRes >= TaskDialogFirstRadioButtonIndex) and (aRadioRes-TaskDialogFirstRadioButtonIndex < RadioButtons.Count) then
|
||||
FRadioButton := RadioButtons[ARadioRes-TaskDialogFirstRadioButtonIndex] as TTaskDialogRadioButtonItem
|
||||
|
Loading…
Reference in New Issue
Block a user