Archive: InstallOptions rect & page-height


InstallOptions rect & page-height
I was experimenting with the InstallOptions\test.nsi that has multiple fields, including a group of three check-boxes.

I modified the example to include a group of three radio-button, separately grouped the check-boxes, and grouped the file-fields separately.

The example ended up too tall ... granted there are too many fields on the page, but I wasn't able to figure out out to make the page taller. I stared at the "rect" field, but wasn't clear how or if to use it.

My question ... how to make a page taller?


; rb_test.ini included by rb_test.nsi attached
[Settings]
NumFields=13
; rect=???

[Field 1]
Type=GroupBox
Left=0
Right=130
Top=0
Bottom=50
Text=" Only one of the following ... "

[Field 2]
Type=radiobutton
Text=Install support for A
Left=10
Right=120
Top=12
Bottom=20
State=0
Flags=GROUP

[Field 3]
Type=radiobutton
Text=Install support for B
Left=10
Right=120
Top=25
Bottom=33
State=1
Flags=NOTABSTOP

[Field 4]
Type=radiobutton
Text=Install support for C
Left=10
Right=120
Top=38
Bottom=46
State=0
Flags=NOTABSTOP

[Field 5]
Type=GroupBox
Left=140
Right=-1
Top=0
Bottom=50
Text=" At least one of the following ... "

[Field 6]
Type=checkbox
Text=Install support for X
Left=150
Right=-10
Top=12
Bottom=20
State=0
Flags=GROUP

[Field 7]
Type=checkbox
Text=Install support for Y
Left=150
Right=-10
Top=25
Bottom=33
State=1
Flags=NOTABSTOP

[Field 8]
Type=checkbox
Text=Install support for Z
Left=150
Right=-10
Top=38
Bottom=46
State=0
Flags=NOTABSTOP

[Field 9]
Type=GroupBox
Left=0
Right=-1
Top=60
Bottom=-1
Text=" Directory decisions"

[Field 10]
Type=FileRequest
State=C:\test.txt
Left=10
Right=-10
Top=72
Bottom=84
Filter=Text Files|*.txt|All files|*.*
Flags=GROUP|FILE_MUST_EXIST|FILE_EXPLORER|FILE_HIDEREADONLY

[Field 11]
Type=DirRequest
Left=10
Right=-10
Top=89
Bottom=101
Text=Select a directory...
State=C:\Program Files\NSIS

[Field 12]
Type=Label
Left=10
Right=-10
Top=106
Bottom=114
Text=This is a label...

[Field 13]
Type=Text
Left=10
Right=-10
Top=114
Bottom=136
State="Multiline\r\nedit..."
Flags=MULTILINE|VSCROLL|WANTRETURN

Are you sure that doesn't fit in the MUI dialog? The MUI has a bit more space in it than the classic dialog that example uses.

If you'd like to use RECT anyway, open up Contrib\UIs\default.exe in Resource Hacker and take a look at dialog 105. You'll notice a big black rectangle in the middle. That's the default RECT InstallOptions, and any other page uses (id = 1018). The classic dialog (default.exe), doesn't have any other rectangles for InstallOptions to use. Currently, only the MUI dialog (modern.exe), has those for the welcome and finish pages (id = 1044). The id of those rectangles, is the value you should use for the RECT field in the INI.

You can use Resource Hacker to add more rectangles, or even modify the size of the entire dialog. Use MUI_UI to tell the MUI to use your new dialog, or ChangeUI, if you're not using the MUI.


Thanks ... that clarified some things ... but I ought to simplify and "refactor" so that pages don't get so big ... mostly just curious how some of the "under the hood" details work.

My opinion of nsis grows and grows the more I use it.