5

I am using Inno Setup. I want to have two custom pages like:

var
 PasswordEdit: TPasswordEdit;
 UserEdit: TEdit;
 Page: TWizardPage;
 Page2: TWizardPage;
...
 Page := CreateCustomPage(wpWelcome, 'Page1', '');
 Page2 := CreateCustomPage(wpWelcome, 'Page2', '');

But Page2 is appearing before Page. Is this the proper way to create more custom pages?

Martin Prikryl
  • 188,800
  • 56
  • 490
  • 992
Vladimir Yanakiev
  • 1,240
  • 1
  • 16
  • 25

1 Answers1

6

If you want page 2 after page 1, then do:

Page2 := CreateCustomPage(Page.ID, 'Page2', '');

CreateCustomPage returns a TWizardPage. This has an ID property. This is what you can pass to the other functions.


So:

var
 PasswordEdit: TPasswordEdit;
 UserEdit: TEdit;
 Page: TWizardPage;
 Page2: TWizardPage;
...
 Page := CreateCustomPage(wpWelcome, 'Page1', '');
 Page2 := CreateCustomPage(Page.ID, 'Page2', '');
Andrew Truckle
  • 17,769
  • 16
  • 66
  • 164