I'm stuck on simple situation with OnClickCheck
property. The problem is that I see a Msgbox
every time I turn on backup
task, but also (while it's switched on) OnClickCheck
appeared on pressing uninst
task too! Seems that OnClickCheck
checks all clicks, but I need to check click only on the first task.
It is logical to add to "WizardForm.TasksList.OnClickCheck
" exact number of task (WizardForm.TasksList.OnClickCheck[0]
), but compiler doesn't agree with it.
[Tasks]
Name: backup; Description: do backup
Name: uninst; Description: do not create uninstaller
[Code]
procedure TaskOnClick(Sender: TObject);
begin
if IsTaskSelected('backup') then
begin
MsgBox('backup task has been checked.', mbInformation, MB_OK)
end;
end;
procedure InitializeWizard();
begin
WizardForm.TasksList.OnClickCheck := @TaskOnClick;
end;
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…