I am using inno setup. I want to have 2 custom pages like:
var
PasswordEdit: TPasswordEdit;
UserEdit: TEdit;
Page: TWizardPage;
Page2: TWizardPage;
...
Page := CreateCustomPage(wpWelcome, 'Page1', '');
Page2 := CreateCustomPage(wpWelcome, 'Page2', '');
But Page2 is appear before page1. Is this the proper way to create more custom pages.
>Solution :
If you want page 2 after page 1, then do:
Page2 := CreateCustomPage(Page.ID, 'Page2', '');
CreateCustomPage returns a page ID so you can use that value as a parameter to any function where it wants to know the page.
The object TWizardPage 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', '');