2

I have installation script that is using TInputQueryWizardPage. How can I increase height of this page? For example if I have this...

procedure InitializeWizard;
begin
  MyPage := CreateInputQueryPage(wpReady,
    'Some Information', 'Enter Information',
    'Enter information, then click Next.');
  MyPage.Add('info1', False);
  MyPage.Add('info2', False);
  MyPage.Add('info3', False);
  MyPage.Add('info4', False);
  MyPage.Add('info5', False);

  MyPage.Values[0] := GetPreviousData('info1', '');
  MyPage.Values[1] := GetPreviousData('info2', '');
  MyPage.Values[2] := GetPreviousData('info3', '');
  MyPage.Values[3] := GetPreviousData('info4', '');
  MyPage.Values[4] := GetPreviousData('info5', '');
end;

...then last edit box is not visible because it cannot fit on the form.

Thank you for your time

A.Z.
  • 69
  • 3
  • 10
  • In my view, this behavior should have been handled by the `TInputQueryWizardPage`, or even better by the common `TWizardPage` ancestor. Unfortunately, I can't find any scroll box like control, so re-parenting the input labels and edits on a scrollable control is not an option (but maybe I missed that). What would I consider is some sort of [`collapsable panel`](http://www.ibm.com/developerworks/library/j-richfaces4/rfCollapsiblePanel.jpg), or moving those labels and edits up so they fit the page surface. – TLama Sep 23 '13 at 20:06
  • I was unable to find solution so far. Temporary I created two input query pages with 4 edit boxes on first and two edit boxes on the second page. – A.Z. Sep 24 '13 at 15:45
  • I'm able to help you with both suggested solutions. I haven't measured if the latter has enough space to look well. Just tell which one you'd prefer and I'll try to post you a related script. Moving controls up is easier and more user friendly in my view... – TLama Sep 24 '13 at 17:37
  • Might be an idea to split the items onto multiple pages, especially if you can divide them into two logical groups. – Miral Sep 26 '13 at 21:40

1 Answers1

6

Since the wizard pages themselves don't support scroll bars and there is no container control with scroll bar support, I would suggest you to shift those edit fields with their corresponding labels upward. You're having 5 of them which is a maximum which looks fine for me if you display a subcaption, what you seem to do. The following script shows how to shift those items upward by the amount of pixels specified in the OffsetPixels constant:

[Setup]
AppName=My Program
AppVersion=1.5
DefaultDirName={pf}\My Program

[Code]
const
  OffsetPixels = 11;

var
  MyPage: TInputQueryWizardPage;

procedure OffsetPageItem(Page: TInputQueryWizardPage; Index, 
  Offset: Integer);
begin
  Page.Edits[Index].Top := Page.Edits[Index].Top + Offset;
  Page.PromptLabels[Index].Top := Page.PromptLabels[Index].Top +
    Offset;
end;

procedure InitializeWizard;
var
  Index: Integer;
begin
  MyPage := CreateInputQueryPage(wpWelcome, 'Caption', 
    'Description', 'SubCaption');

  Index := MyPage.Add('info1', False);  
  Index := MyPage.Add('info2', False);
  OffsetPageItem(MyPage, Index, -Index * OffsetPixels);
  Index := MyPage.Add('info3', False);
  OffsetPageItem(MyPage, Index, -Index * OffsetPixels);
  Index := MyPage.Add('info4', False);
  OffsetPageItem(MyPage, Index, -Index * OffsetPixels);
  Index := MyPage.Add('info5', False);
  OffsetPageItem(MyPage, Index, -Index * OffsetPixels);
end;

And a screenshot:

enter image description here

TLama
  • 75,147
  • 17
  • 214
  • 392
  • 1
    Hi, thank you for you very detail explanation. I have accepted answer not as resolution to my problem but as explanation why I can't do what I was trying. "Since the wizard pages themselves don't support scroll bars and there is no container control with scroll bar support, I would suggest you to shift those edit fields with their corresponding labels upward.". I resolve my issue by creating two input query pages with 4 edit boxes. – A.Z. Dec 10 '13 at 14:31