DeeJay007
DeeJay007

Reputation: 509

Inno Setup how to change the font color or style of label on TInputFileWizardPage

I have a input file wizard page where I select a file and proceed with the next page. The code is as follows.

[Code]
var
    PageFileSelect: TInputFileWizardPage;

function CreateFileSelectPage(): String;
begin
    PageFileSelect := CreateInputFilePage(PagePreviousPage.ID,
        'Select File',
        'Select File Location',
        'Additional comments...');

    PageFileSelect.Add('Font color or style change required...',
        'test.exe',
        '*.exe');

    PageFileSelect.Values[0] := FileLocation;
end;

Is there a way to change the font color or style (bold, italic) for the line "Font color or style change required..." in the wizard page?

Thanks in advance!

Upvotes: 3

Views: 2505

Answers (1)

Martin Prikryl
Martin Prikryl

Reputation: 202292

Use TInputFileWizardPage.PromptLabels to access the TNewStaticText instance that represents the label:

PageFileSelect.PromptLabels[0].Font.Color := clRed;
PageFileSelect.PromptLabels[0].Font.Style := [fsBold, fsItalic];

enter image description here

Upvotes: 4

Related Questions