Inno Setup: How to change background color - colors

Is there a way to change the background color of the Inno Setup bottom panel to white color?
Thanks for your help!

That bottom panel that you described is actually the area of the Wizard form, and so you can just set the Color property of the WizardForm object itself:
[Code]
procedure InitializeWizard;
begin
WizardForm.Color := clWhite;
end;
There's yet one more thing worth mentioning; though the above code shows how to set that area color to a constant white as you asked, what you can see on your screenshot as white is actually a color given by the Windows theme, so that color must not always be white. So if your aim was to have the same color as the page you're currently on, then you should rather inherit the color from the parent pages:
[Code]
procedure CurPageChanged(CurPageID: Integer);
begin
case CurPageID of
wpWelcome: WizardForm.Color := WizardForm.WelcomePage.Color;
wpFinished: WizardForm.Color := WizardForm.FinishedPage.Color;
else
WizardForm.Color := WizardForm.InnerPage.Color;
end;
end;

Related

Change the color of the setup frame

Is it possible to change the color of the setup frame, in this case from gray to white. (or vice versa)
For clarity an example:
Thank you for your time,
Alexei
Issue resolved with:
WizardForm.Color := clWhite;
After a lot of searching I found this on this great forum. Thanks for thinking along and answering.

AUTOHOTKEY changing WS_EX_CLIENTEDGE color

How can I custom specify, or force, the color of WS_EX_CLIENTEDGE [+E0x200]? I want a much more toned down color for it.
CustomColor := 000055
RequestToDisplay := "I want to change the color of WS_EX_CLIENTEDGE"
RequestTitle := "[REQUEST]"
GUI Request:FONT, s9 w1000 Q5, Verdana
GUI Request:COLOR, %CustomColor%, 000001
GUI Request:Add, EDIT, vMyAddress cFFFFFF r3 w400 xp-11 yp-0 -VScroll Multi WantTab t8 +E0x200 +Left
GUI Request:+LastFound +AlwaysOnTop -Caption -SysMenu
GUI Request:MARGIN, 0, 0
GUI Request:SHOW, x200 y300, %RequestTitle%
ControlSend, Edit1, %RequestToDisplay%, %RequestTitle%
return
ESC::ExitApp
or you might be looking for one of the parameter specified in https://msdn.microsoft.com/en-us/library/windows/desktop/ms724371(v=vs.85).aspx
for instance, see COLOR_ACTIVEBORDER
and for autohotkey SetSysColors dllcall see https://autohotkey.com/board/topic/36724-setsyscolors-set-system-colors/
hope this helps
steph
CP,
to my understanding, WS_EX_CLIENTEDGE is a window style (https://msdn.microsoft.com/en-us/library/windows/desktop/ff700543(v=vs.85).aspx).
to change the color of the edge that this window style produces, is an entire other question.
i would not know how to formulate this precise question.
but looking at your autohotkey code (AUTOHOTKEY changing WS_EX_CLIENTEDGE color), i see that CustomColor := 000055, to me it looks like an hexadecimal color value specified in a decimal way, that is without the 0x prefix (but that would be mandatory in C/C++)
SP.
in my C/C++ understanding one changes window's elements color calling SetSysColors() function see https://msdn.microsoft.com/en-us/library/windows/desktop/ms724940(v=vs.85).aspx for an example.
in that example, COLOR_ACTIVECAPTION is used to specify the window border element's color, it might be the one you are looking for.

Inno Setup: TNewStaticText displays the wrong color

When I Change Font.Color of a TNewStaticText to any color, the TNewStaticText stays black.
But When I Change Font.Color of a TLabel everything works fine.
But when I use TLabel I get wierd results on windows xp.
Why does TNewStaticText always display the black color?
What stable text in inno setup can I use that won't change color or any other properties on different computers?

Inno Setup correctly position a label with respect to screen DPI

I am trying to position a label above the InfoAfterPage section and have it always appear there no matter what scaling is used, just as the amount of space required shown below is positioned.
I am using Label.Top := WizardForm.InfoAfterPage.Height - 20, but am aware that may appear out of place if the screen is scaled in any way. What is the best way to set this so that always stays in this position no matter how the screen is scaled?
Use ScaleY support function:
Label.Top := WizardForm.InfoAfterPage.Height - ScaleY(20);
Or even better, do not even make assumptions about the label height:
Label.Top := WizardForm.InfoAfterPage.Height - ScaleY(7) - Label.Height;
Or for your specific case, just reuse a position of the ComponentsDiskSpaceLabel:
Label.Top := WizardForm.ComponentsDiskSpaceLabel.Top;
Note that the ComponentsDiskSpaceLabel exists for a lifetime of the wizard, so you can access it anytime.

Inno Setup change CreateOutputMsgMemoPage font

Is it possible to change the font that the actual message part of the window created using CreateOutputMsgMemoPage displays in?
I need to return some results from a database query to a window in Inno Setup, which I am doing by reading in from a file using:
LoadStringFromFile(ExpandConstant('{app}\Output.txt'), astrResults);
and then creating the page like so:
ResultsPage := CreateOutputMsgMemoPage(wpInstalling,
'Results', 'The following results were returned from the database.',
'',
astrResults);
The trouble is that I am losing the columnar tab delimited formatting from the text file as the text is being displayed in a variable width font. Therefore, I need to used a fixed width font (e.g. Lucida Console) to maintain the correct formatting. Is there a way to do this?
It is possible to use:
ResultsPage.RichEditViewer.Font.Name := 'Lucida Console';
to change the font and:
ResultsPage.RichEditViewer.Font.Size := 9;
to change the size. Thank you #TLama.

Resources