Inno Setup: Color for modal and browse directory windows

倾然丶 夕夏残阳落幕 提交于 2019-11-28 06:19:17

问题


Is it possible to change inner background color for modal and browse directory windows in Inno Setup? In my case I want it should be white.


UPD: Same behaviour is on the inner pages of Inner Setup, but I've fixed it by setting WizardForm.InnerPage.Color := clWhite;

I'm using VclStylesInno for styling my installer with custom style spreadsheat.


回答1:


You cannot change the color of these in Inno Setup itself, except by a custom build of Inno Setup or some addon DLL (see below).

All you can do is to re-implement these dialogs from the scratch:

  • For the "browse" dialog: Handle the WizardForm.DirBrowseButton.OnClick and use CreateCustomForm and TFolderTreeView to implement the browse dialog. Download Inno Setup code and copy the existing implementation from SelFolderForm.pas.

    For an example of handling WizardForm.DirBrowseButton.OnClick, see
    How to display localized Program Files name (display name) during installation?

  • For the "cancel" dialog: Implement the CancelButtonClick event function. Make sure you set Confirm to False to get rid of the default prompt. And implement your own. Again, use the CreateCustomForm.

It's a lot of work for a small gain. I'd not do it.


Instead, you can use VCL Styles for Inno Setup (DLL) to style Inno Setup windows (including all modal dialogs).




回答2:


As turned out, the reason was in the "Colors" option in Bitmap Designer, which I use to modify my installer style. This option makes some additional styling for controls:



来源:https://stackoverflow.com/questions/37072155/inno-setup-color-for-modal-and-browse-directory-windows

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!