我有'A'页面TOutputMsgWizardPage
和'B'页面TInputQueryWizardPage
。
当我点击B页的'下一步'时,显示一个包含'确定'和'取消'按钮的MsgBox
。当我点击“确定”时,返回“A”页面。
会发生吗?
有关如何实现这一目标的任何提示?
页面序列是:WelcomePage => OutputMsgPage => InputQueryPage => SelectDirPage
使用TWizardPage.OnNextButtonClick
处理“下一步”按钮点击。
处理“下一步”按钮时,您可以模拟按“返回”按钮返回上一页。
[Code]
var
OutputMsgPage: TOutputMsgWizardPage;
InputQueryPage: TInputQueryWizardPage;
function InputQueryPageNextButtonClick(Sender: TWizardPage): Boolean;
begin
Result := True;
if MsgBox('Go back?', mbConfirmation, MB_OKCANCEL) = IDOK then
begin
WizardForm.BackButton.OnClick(WizardForm.BackButton);
Result := False;
end;
end;
procedure InitializeWizard();
begin
OutputMsgPage := CreateOutputMsgPage(wpWelcome, 'Output page', '', 'Output page');
InputQueryPage := CreateInputQueryPage(OutputMsgPage.ID, 'Input page', '', 'Input page');
InputQueryPage.OnNextButtonClick := @InputQueryPageNextButtonClick;
end;