Хамик
Старожил
Как в функцию function BackButtonClick(CurPageID: Integer): Boolean; прописать переход на кастомную страницу? Или как-то по другому можно? Если так указать не работает.
Наверное самой функции маловато будет, вот еще пример
Код:
function BackButtonClick(CurPageID: Integer): Boolean;
begin
if CurPageID = Page[2].ID then Page[1].Surface.Show else
result := true;
end;
Код:
[setup]
appname=app
appvername=app
CreateAppDir=no
[code]
var
Page: array [1..2] of TWizardPage;
Param, Params: TNewButton;
procedure OnClick(Sender: TObject);
begin
Page[2].Surface.Show;
end;
procedure aem();
begin
Page[1] := CreateCustomPage(wpWelcome, 'первая кастомная страница', '');
///////////////////////////////////////////////////////////////////////////////////////////////////////
Param := TNewButton.Create(Page[1]);
Param.Parent := Page[1].Surface;
Param.Caption := 'первая кастомная страница';
Param.OnClick := @OnClick;
Param.SetBounds(ScaleX(160), ScaleY(100), ScaleX(160), ScaleY(30));
///////////////////////////////////////////////////////////////////////////////////////////////////////
Page[2] := CreateCustomPage(Page[1].ID, 'вторая кастомная страница', '');
Params := TNewButton.Create(Page[2]);
Params.Parent := Page[2].Surface;
Params.Caption := 'вторая кастомная страница';
Params.SetBounds(ScaleX(160), ScaleY(100), ScaleX(160), ScaleY(30));
///////////////////////////////////////////////////////////////////////////////////////////////////////
end;
procedure InitializeWizard();
begin
aem();
end;
function ShouldSkipPage(PageID: Integer): Boolean;
begin
if PageID = Page[2].ID then result := true;
end;
function BackButtonClick(CurPageID: Integer): Boolean;
begin
if CurPageID = Page[2].ID then Page[1].Surface.Show else
result := true;
end;