mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-08 07:58:06 +02:00
LCL: TaskDialog, fix default radio-button
This commit is contained in:
parent
1bf4baa6b4
commit
5882a5bfb5
@ -218,7 +218,7 @@ begin
|
||||
FillChar(TaskDlg, SizeOf(LCLTaskDialog.TTaskDialog), 0);
|
||||
|
||||
if RadioButtons.DefaultButton<> nil then
|
||||
DefRB := RadioButtons.DefaultButton.ModalResult
|
||||
DefRB := RadioButtons.DefaultButton.Index
|
||||
else
|
||||
DefRB := 0;
|
||||
if Buttons.DefaultButton<>nil then
|
||||
|
@ -827,7 +827,7 @@ begin
|
||||
Config.hMainIcon := TD_ICONS[aDialogIcon];
|
||||
Config.hFooterIcon := TD_FOOTERICONS[aFooterIcon];
|
||||
Config.nDefaultButton := aButtonDef;
|
||||
Config.nDefaultRadioButton := aRadioDef;
|
||||
Config.nDefaultRadioButton := aRadioDef+200;
|
||||
Config.cxWidth := aWidth;
|
||||
Config.pfCallback := @TaskDialogCallbackProc;
|
||||
Config.lpCallbackData := @self;
|
||||
@ -952,7 +952,7 @@ begin
|
||||
Hint := aHint; // note shown as Hint
|
||||
end;
|
||||
inc(Y,Height + ARadioOffset);
|
||||
if (i=0) or (i+200=aRadioDef) then
|
||||
if (i=0) or (i=aRadioDef) then
|
||||
Checked := true;
|
||||
end;
|
||||
end;
|
||||
|
Loading…
Reference in New Issue
Block a user