Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Order of custom pages in Inno Setup

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.

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>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', '');
Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading