Автор: Nuclear_glare
Дата сообщения: 18.08.2012 23:00
[more] Всем здравствуйте. Возник вопрос по Inno Setup. Использую вот такой код для растяжения WizardImage на всю страницу:
Код: var
WelcomeLabel1, WelcomeLabel2, FinishedLabel, FinishedHeadingLabel: TLabel;
procedure InitializeWizard;
begin
ExtractTemporaryFile('image1.bmp');
WizardForm.WizardBitmapImage.Width:= ScaleX(497);
WizardForm.WizardBitmapImage2.Width:= ScaleX(497);
WizardForm.WizardBitmapImage2.Bitmap.LoadFromFile(ExpandConstant('{tmp}\image1.bmp'));
WelcomeLabel1:= TLabel.Create(WizardForm);
WelcomeLabel1.AutoSize:= False;
with WizardForm.WelcomeLabel1 do
WelcomeLabel1.SetBounds(Left, Top, Width, Height);
WelcomeLabel1.Font:= WizardForm.WelcomeLabel1.Font
WelcomeLabel1.Font.Color:= clWhite;
WelcomeLabel1.Transparent:= True;
WelcomeLabel1.WordWrap:= true;
WelcomeLabel1.Caption:= WizardForm.WelcomeLabel1.Caption;
WelcomeLabel1.Parent:= WizardForm.WelcomePage
WelcomeLabel2:= TLabel.Create(WizardForm);
WelcomeLabel2.AutoSize:= False;
with WizardForm.WelcomeLabel2 do
WelcomeLabel2.SetBounds(Left, Top, Width, Height);
WelcomeLabel2.Font:= WizardForm.WelcomeLabel2.Font
WelcomeLabel2.Font.Color:= clWhite;
WelcomeLabel2.Transparent:= True;
WelcomeLabel2.WordWrap:= true;
WelcomeLabel2.Caption:= WizardForm.WelcomeLabel2.Caption;
WelcomeLabel2.Parent:= WizardForm.WelcomePage
FinishedHeadingLabel:= TLabel.Create(WizardForm);
FinishedHeadingLabel.AutoSize:= False;
with WizardForm.FinishedHeadingLabel do
FinishedHeadingLabel.SetBounds(Left, Top, Width, Height);
FinishedHeadingLabel.Font:= WizardForm.FinishedHeadingLabel.Font
FinishedHeadingLabel.Font.Color:= clWhite;
FinishedHeadingLabel.Transparent:= True;
FinishedHeadingLabel.WordWrap:= true;
FinishedHeadingLabel.Caption:= WizardForm.FinishedHeadingLabel.Caption;
FinishedHeadingLabel.Parent:= WizardForm.FinishedPage
FinishedLabel:= TLabel.Create(WizardForm);
FinishedLabel.AutoSize:= False;
with WizardForm.FinishedLabel do
FinishedLabel.SetBounds(Left, Top, Width, Height);
FinishedLabel.Font:= WizardForm.FinishedLabel.Font
FinishedLabel.Font.Color:= clWhite;
FinishedLabel.Transparent:= True;
FinishedLabel.WordWrap:= true;
FinishedLabel.Caption:= WizardForm.FinishedLabel.Caption;
FinishedLabel.Parent:= WizardForm.FinishedPage
WizardForm.WelcomeLabel1.Hide;
WizardForm.WelcomeLabel2.Hide;
WizardForm.FinishedLabel.Hide;
WizardForm.FinishedHeadingLabel.Hide;
end;
procedure CurPageChanged(CurPageID: Integer);
begin
FinishedLabel.Caption:= WizardForm.FinishedLabel.Caption;
end;