1

The following image shows the size of a standard custom page:

http://img232.imageshack.us/img232/8449/imagejp.png

I've intentionally removed the panel on top, where you usually see Caption, Description and Logo. So you can see that the actual size of the page is quite small - there are gaps on top, left and right sides. Is there any way to resize the page, so there are no gaps? I want the image to take the whole space.

I create the page using CreateCustomPage function.

Paya
  • 5,124
  • 4
  • 45
  • 71
  • 3
    You realize that by changing your page's margins, you'll break with the patterns established by the rest of the pages in the setup wizard? Whether you like the margins or not, if all the pages but one respect them, you're in for a visually jarring effect. There's a reason this is part of the base template. – Cody Gray - on strike Dec 24 '10 at 16:02
  • 1
    Actually I want to create my own Welcome Page, and if you check the look of the default Welcome Page, you will notice the design is quite different than the rest of the wizard. – Paya Dec 24 '10 at 16:23

2 Answers2

2

If you want complete control over one of the pages in an Inno Setup wizard, you'll need to use the CreateCustomForm function instead of CreateCustomPage.

As I mentioned in a comment, CreateCustomPage retains the margins and other elements of the base template for a consistent look and feel. That's part of the charm to Inno Setup—how easy it is to create simple setup wizards with a standardized and nice-looking UI. If you're sure that you want to override this, however, it is indeed an option. CreateCustomForm will allow you to lay out the form however you wish.

Remember that if you're creating your own welcome page, you'll probably also want to make sure that you've skipped showing the default welcome page!

Cody Gray - on strike
  • 239,200
  • 50
  • 490
  • 574
1

So I have discovered this can be done quite easily:

// Create custom page
mainPage := CreateCustomPage(wpSelectTasks, '', '');
mainPage.Surface.Notebook.SetBounds(0, 0, WizardForm.ClientWidth, ScaleY(260));

But be aware this code affects other wizard pages as well, so you either need to change the notebook bounds to the old values when you switch pages, or you need to reposition controls on these affected pages (or skip them).

This SO answer is also changing bounds of wizard pages.

Community
  • 1
  • 1
Paya
  • 5,124
  • 4
  • 45
  • 71