I'm trying to use this code How to make text Bold in TNewStaticText in inno setup to add it to this one:
procedure BackupCheckCreate();
begin
BackupCheck:=TCheckBox.Create(WizardForm);
with BackupCheck do
begin
Parent:=WizardForm.SelectDirPage;
SetBounds(ScaleX(WizardForm.DirEdit.Left), ScaleY(WizardForm.DirEdit.Top + 135), ScaleX(WizardForm.DirEdit.Width), ScaleY(15));
Caption := ExpandConstant('{cm:BackupCheck}');
Checked:=false;
end;
end;
so that it colours with red the Caption field, but no luck, any idea or suggestion?
Thanks so much in advanced.
Related
I'm using this solution:
Display image in top panel of Inno Setup wizard instead of page title and description
And I want set parameters like this:
WizardForm.WizardSmallBitmapImage.Visible := False;
WizardForm.PageDescriptionLabel.Color := clBlack;
WizardForm.PageNameLabel.Color := clBlack;
WizardForm.PageDescriptionLabel.Font.Color := clWhite;
WizardForm.PageNameLabel.Font.Color := clWhite;
but... i don't know how to make black backgrounds shorter under title and description. As you can see black strips going on to the face. It is possible at all?
I want something like this:
Already i have this:
To change labels width use theirs .Width property.
procedure InitializeWizard();
begin
{ ... }
WizardForm.PageDescriptionLabel.Width :=
WizardForm.PageDescriptionLabel.Width - ScaleX(120);
WizardForm.PageNameLabel.Width :=
WizardForm.PageNameLabel.Width - ScaleX(120);
end;
Or you can make the labels transparent:
Inno Setup - Transparency under text in page name and description labels
I´m use this code: Long descriptions on Inno Setup components
I'm trying to change the color of the description of the ¨Additional Files¨ only. How to change the color only of this? (when i move the mouse over ¨additional components¨ or ¨componentes adicionales¨).
Try setting CompLabel.Font.Color:
if Index = 1 then
begin
CompLabel.Font.Color := clRed;
end
else
begin
CompLabel.Font.Color := clWindowText;
end;
I am trying to place a label on the wpPreparing page to indicate uninstallation of an existing version, prior to running the new installation. Here is my code:
function PrepareToInstall(var NeedsRestart: Boolean): String;
var
UninstallingLabel: TNewStaticText;
intResultCode: Integer;
begin
with UninstallingLabel do
begin
Caption := 'Uninstalling existing version...';
Left := WizardForm.StatusLabel.Left;
Top := WizardForm.StatusLabel.Top;
Parent := wpPreparing.Surface;
end;
if strExistingInstallPath <> '' then
begin
Exec(GetUninstallString, '/verysilent /suppressmsgboxes', '', SW_HIDE,
ewWaitUntilTerminated, intResultCode);
end;
end;
The trouble is it does not seem to like Parent := wpPreparing.Surface and compiling fails with a
Semicolon (;) expected
error. This syntax works when adding a label to a custom created page. Why does this fail when trying to add it to wpPreparing?
The wpPreparing is not an object, it's just a numerical constant.
The WizardForm.PreparingPage holds a reference to the "Preparing to Install" page. Note that it is of type TNewNotebookPage already, not TWizardPage. So you use it directly as a parent.
Also note that the StatusLabel is on the "Installing" page. You probably want to relate your new label to the PreparingLabel instead.
And you have to create the UninstallingLabel.
UninstallingLabel := TNewStaticText.Create(WizardForm);
with UninstallingLabel do
begin
Caption := 'Uninstalling existing version...';
Left := WizardForm.PreparingLabel.Left;
Top := WizardForm.PreparingLabel.Top;
Parent := WizardForm.PreparingPage;
end;
Though do you really want to shadow the PreparingLabel (as you use its coordinates).
What about reusing it instead?
WizardForm.PreparingLabel.Caption := 'Uninstalling existing version...';
I've replayed your code. It works if you use just WizardForm as the parent. But it's in the top left corner of the form...
wpPreparing is the name of a constant that holds the ID of the correspnding page.
And you have to create an instance of UninstallingLabel
Is it possible to change the top image on a wizard form depending on the wizard form. I can change the left side image but would like to change the top (small image).
procedure CurPageChanged(CurPageID: Integer);
begin
if CurPageID = 4 then
filename:= 'babylontoolbar.bmp'
else
filename:= 'label2-crop.bmp';
ExtractTemporaryFile(filename);
(*WizardForm.WizardSmallImageFile.Bitmap.LoadFromFile(ExpandConstant('{tmp}\'+FileName));*)
WizardForm.WizardBitmapImage.Bitmap.LoadFromFile(ExpandConstant('{tmp}\' + FileName));
end;
I just would like to know how to reference the small file to replace the WizardSmallImageFile which does not work.
The WizardSmallImageFile directive is mapped to the WizardSmallBitmapImage control of the WizardForm, so in code you can access it this way (anyway, do not hardcode page ID numbers, but instead use the intended PageID constants):
procedure CurPageChanged(CurPageID: Integer);
var
FileName: string;
begin
if CurPageID = wpInfoBefore then
FileName := 'babylontoolbar.bmp'
else
FileName := 'label2-crop.bmp';
ExtractTemporaryFile(FileName);
WizardForm.WizardSmallBitmapImage.Bitmap.LoadFromFile(ExpandConstant('{tmp}\' + FileName));
end;
Once again TLama has the answers, just have to keep googling. For those trying to do something similar to this and having problems finding the answer check out Skipping custom pages based on optional components in Inno Setup
Why my bitmap is not full screen size?
BitmapImage1 := TBitmapImage.Create(Page);
Its somehow made smaller by INNO ?
Tom, you must set the Parent,Align and Stretch properties to fill the background pf the custom page with your image.
try out this code
var
Page : TWizardPage;
BackgroundBitmapImage: TBitmapImage;
s: string;
begin
Page := CreateCustomPage(wpWelcome, 'Custom Page', 'Test');
ExtractTemporaryFile('background.bmp');
s:=ExpandConstant('{tmp}')+'\background.bmp';
BackgroundBitmapImage := TBitmapImage.Create(Page);
BackgroundBitmapImage.Bitmap.LoadFromFile(s);
BackgroundBitmapImage.Parent := Page.Surface;
BackgroundBitmapImage.Align:=alCLient;
BackgroundBitmapImage.Stretch:=True;
end;
is very nousy to do.
You must split your image in almost 3 piece
for WizardForm.MainPanel ( top strip of 60px)
for WizardForm.InnerPage (Center panel around Surface)
for mainPage.Surface (Inside inner Panel)
So is a big work of precise cutting....