- NSIS Discussion
- Bitmap on custom page not aligned to left edge of dialog
Archive: Bitmap on custom page not aligned to left edge of dialog
rsegal
5th March 2003 21:19 UTC
Bitmap on custom page not aligned to left edge of dialog
I've got a custome dialog page that has a bitmap in it. I want the bitmap aligned to the left edge of the dialog so there is no empty space between the bitmap and the left edge of the dialog. In my ini file for the dialog I have the following entry for displaying the bitmap,
[Field 5]
Type=bitmap
Text=MyImage.bmp
Left=0
Right=16
Top=0
Bottom=314
I figured Left=0 would but the image right on the edge of the dialog but there is clearly space in between the bitmap and the edge of the dialog. Any ideas?
Joel
5th March 2003 21:24 UTC
Does in the ".ini" (left, bottom, right, Top units) has the same values that the bitmap's width and height?
rsegal
5th March 2003 21:30 UTC
Yes. Although if I change the dimensions it resizes the image to fit the dimensions.
Joost Verburg
5th March 2003 21:46 UTC
InstallOptions replaces the inner window of the NSIS dialog.
There is usually a margin between the inner window and the edge of the dialog.
You can add an extra rect to the UI dialog resource and use the IO Rect setting.
rsegal
6th March 2003 02:35 UTC
InstallOptions replaces the inner window of the NSIS dialog.
That makes sense then.
You can add an extra rect to the UI dialog resource and use the IO Rect setting.
I don't know what you mean by adding an extra rect though. Do you mean I need to modify the dialog resource exectuable?
Joost Verburg
6th March 2003 11:21 UTC
So you are using the Classic UI and want to add a page with an image on the left side, like the Modern UI Welcome page?
You should modify the UI (Contrib\UIs\default.exe) and use ChangeUI.
rsegal
6th March 2003 15:44 UTC
So you are using the Classic UI and want to add a page with an image on the left side, like the Modern UI Welcome page?
Yes, that's exactly what I want to do. I'll definitely try that out. Thanks!
rsegal
6th March 2003 16:12 UTC
I could be looking at this wrong but ChangeUI doesn't seem to let you change the appearance of the finish page.
Sunjammer
6th March 2003 16:22 UTC
ChangeUI allows you to use a different resource exe file, one that has the shape and controls you want.
rsegal
6th March 2003 16:57 UTC
ChangeUI allows you to use a different resource exe file, one that has the shape and controls you want.
Sure I understand that. However, I'm looking at the resource exe's that are currently there (default, modern, modern1) and I don't see any visual relation between the dialog's in those files and the ones that are used in my installer. I'm sure they are related I just find it difficult seeing any relation at all. Is there an easy way to tell?
kichik
6th March 2003 17:07 UTC
The black rect in the middle of dialog 105 is the one NSIS puts the dialog on. You need to create another one just like it, resize it to fill the width of the installer and tell InstallOptions to use it with the Rect field in the Settings section of the INI file.
Because NSIS puts the other dialogs "inside" that rect you will never see a "complete" dialog in the resource editor only parts of it. Other than that some controls are hidden by default and are unhidden by NSIS at runtime, that might create a difference too.
rsegal
6th March 2003 18:23 UTC
That was the key. Once I set "Rect" equal to 1044 I got what I was looking for. Thanks alot for your help guys!