Full code section:
Code:
var
bgImage : TBitmapImage;
WelcomeLbl1,WelcomeLbl2,FinishedLbl1,FinishedLbl2: TLabel;
WelcomeLabel1,WelcomeLabel2,FinishedHeadingLabel,FinishedLabel: TLabel;
procedure InitializeWizard();
begin
with wizardform do begin
bgImage:= TBitmapImage.Create(MainForm);
bgImage.Align:= alClient;
bgImage.Stretch:= False;
bgImage.Parent:= MainForm;
bgImage.Center:= True;
bgImage.BackColor:= $000000;
WelcomeLabel1.Visible:= False
WelcomeLabel2.Visible:= False
FinishedLabel.Visible:= False
FinishedHeadingLabel.Visible:= False
WizardBitmapImage.Parent := WelcomePage;
// the wizard.bmp images' dimensions specified here
WizardBitmapImage.Width:= 497;
WizardBitmapImage.height:= 313;
WizardBitmapImage2.Width:= 497;
WizardBitmapImage2.Height:= 313;
WizardSmallBitmapImage.visible:=true;
WizardSmallBitmapImage.Width:=220;
WizardSmallBitmapImage.Height:=58;
//use value of 0 for leftmost alignment
WizardSmallBitmapImage.Left:=+0;
//manipulate the small unbolded top text on wizard pages. 495 is the total width
//(subtract out the smallbitmapimage's width for the max text box width)
PageDescriptionLabel.Visible:=true;
PageDescriptionLabel.Width:=250;
PageDescriptionLabel.Left:=+240;
//manipulate the bold description text position
PageNameLabel.Width:=275;
PageNameLabel.Left:=+230;
//Manipulate text on welcome page - this is the top bold "Welcome..." text
WelcomeLbl1 := TLabel.Create(WizardForm);
with WelcomeLbl1 do
begin
Parent := WizardForm.WelcomePage;
WordWrap := True;
AutoSize := False;
Caption := WizardForm.WelcomeLabel1.Caption;
Transparent:= True;
Left := WelcomeLabel1.Left+50;
Top := WelcomeLabel1.Top-10;
Width:= 350;
Height := WelcomeLabel1.Height;
Font.Color := ClBlack;
Font.Size := 12;
Font.Style := [fsBold];
end;
WelcomeLbl2 := TLabel.Create(WizardForm);
with WelcomeLbl2 do
begin
Parent := WizardForm.WelcomePage;
WordWrap:= True;
AutoSize:=False;
Caption := WizardForm.WelcomeLabel2.Caption;
Left := WelcomeLabel2.Left+90;
Top := WelcomeLabel2.Top-10;
Width := 230; //this is the width of the text 'box'
Height := WelcomeLabel2.Height;
Transparent:= True;
Font.Color:= ClBlack;
end;
//Manipulate text on finished page - this is the top bold "Completing..." text
FinishedLbl1 := TLabel.Create(WizardForm);
with FinishedLbl1 do
begin
Parent := WizardForm.FinishedPage;
WordWrap := True;
AutoSize:=False;
Caption := WizardForm.FinishedHeadingLabel.Caption;
Transparent:=True;
Left := WelcomeLbl1.Left;
Top := WelcomeLbl1.Top;
Width := WelcomeLbl1.Width;
Height := WelcomeLbl1.Height;
Transparent := True;
Font.Color := ClBlack;
Font.Size := 12;
Font.Style := [fsBold];
end;
FinishedLbl2 := TLabel.Create(WizardForm);
with FinishedLbl2 do
begin
Parent := WizardForm.FinishedPage;
WordWrap := True;
AutoSize:=False;
Caption := WizardForm.FinishedLabel.Caption ;
Transparent := True;
Left := WelcomeLbl2.Left;
Top := WelcomeLbl2.Top;
Width := WelcomeLbl2.Width ;
Height := WelcomeLbl2.Height;
Transparent := True;
Font.Color := ClBlack;
end;
end;
end;
procedure CurPageChanged(CurPageID: Integer);
begin
FinishedLbl2.Caption:= WizardForm.FinishedLabel.Caption;
end;