Ветеран
Сообщения: 1133
Благодарности: 581
|
Профиль
|
Отправить PM
| Цитировать
Накидал пример
читать дальше »
Код:
[Setup]
AppName=My Program
AppVerName=My Program v 1.5
DefaultDirName={pf}\My Program
OutputDir=.
Code]
var
WelcomeLabel1,WelcomeLabel2,FinishedHeadingLabel,
FinishedLabel,PageNameLabel,PageDescriptionLabel:TLabel;
procedure InitializeWizard();
begin
WizardForm.WelcomeLabel1.Hide;
WizardForm.WelcomeLabel2.Hide;
WizardForm.PageNameLabel.Hide;
WizardForm.PageDescriptionLabel.Hide;
WizardForm.FinishedHeadingLabel.Hide;
WizardForm.FinishedLabel.Hide;
WizardForm.WizardBitmapImage.Align:=true;
WizardForm.WizardBitmapImage2.Align:=true;
WizardForm.WizardSmallBitmapImage.Align:=true;
WelcomeLabel1:=TLabel.Create(WizardForm);
WelcomeLabel1.Left:=ScaleX(150);
WelcomeLabel1.Top := ScaleY(15);
WelcomeLabel1.Width := ScaleX(320);
WelcomeLabel1.Height := ScaleY(75);
WelcomeLabel1.AutoSize := False;
WelcomeLabel1.WordWrap := True;
WelcomeLabel1.Font.Color := clBlack;
// здесь можно поиграть шрифтом
// WelcomeLabel1.Font.Style := [fsBold];
// WelcomeLabel1.Font.Name:='MS Sans Serif';
WelcomeLabel1.Font.Size := 14;
WelcomeLabel1.Transparent := True;
WelcomeLabel1.Parent := WizardForm.WelcomePage;
WelcomeLabel2:=TLabel.Create(WizardForm);
WelcomeLabel2.Left := ScaleX(150);
WelcomeLabel2.Top := ScaleY(90);
WelcomeLabel2.Width := ScaleX(320);
WelcomeLabel2.Height := ScaleY(200);
WelcomeLabel2.AutoSize := False;
WelcomeLabel2.WordWrap := True;
WelcomeLabel2.Font.Color := clBlack;
WelcomeLabel2.Font.Size := 8;
WelcomeLabel2.Transparent := True;
WelcomeLabel2.Parent := WizardForm.WelcomePage;
PageNameLabel := TLabel.Create(WizardForm);
PageNameLabel.Left := ScaleX(25);
PageNameLabel.Top := ScaleY(10);
PageNameLabel.Width := ScaleX(300);
PageNameLabel.Height := ScaleY(14);
PageNameLabel.AutoSize := False;
PageNameLabel.WordWrap := True;
PageNameLabel.Font.Color := clBlack;
PageNameLabel.Font.Style := [fsBold];
PageNameLabel.Transparent := True;
PageNameLabel.Parent := WizardForm.MainPanel;
PageDescriptionLabel := TLabel.Create(WizardForm);
PageDescriptionLabel.Left := ScaleX(40);
PageDescriptionLabel.Top := ScaleY(25);
PageDescriptionLabel.Width := ScaleX(475);
PageDescriptionLabel.Height := ScaleY(30);
PageDescriptionLabel.AutoSize := False;
PageDescriptionLabel.WordWrap := True;
PageDescriptionLabel.Font.Color := clBlack;
PageDescriptionLabel.Transparent := True;
PageDescriptionLabel.Parent := WizardForm.MainPanel;
FinishedHeadingLabel:=TLabel.Create(WizardForm);
FinishedHeadingLabel.Left := ScaleX(150);
FinishedHeadingLabel.Top := ScaleY(15);
FinishedHeadingLabel.Width := ScaleX(320);
FinishedHeadingLabel.Height := ScaleY(75);
FinishedHeadingLabel.AutoSize := False;
FinishedHeadingLabel.WordWrap := True;
FinishedHeadingLabel.Font.Color := clBlack;
// здесь тоже можно поиграть шрифтом
// FinishedHeadingLabel.Font.Style := [fsBold];
// FinishedHeadingLabel.Font.Name:='MS Sans Serif';
FinishedHeadingLabel.Font.Size := 14;
FinishedHeadingLabel.Transparent := True;
FinishedHeadingLabel.Parent := WizardForm.FinishedPage;
FinishedLabel:=TLabel.Create(WizardForm);
FinishedLabel.Left := ScaleX(150);
FinishedLabel.Top := ScaleY(90);
FinishedLabel.Width := ScaleX(320);
FinishedLabel.Height := ScaleY(200);
FinishedLabel.AutoSize := False;
FinishedLabel.WordWrap := True;
FinishedLabel.Font.Color := clBlack;
FinishedLabel.Font.Size := 8;
FinishedLabel.Transparent := True;
FinishedLabel.Parent := WizardForm.FinishedPage;
end;
procedure CurPageChanged(CurPageID: Integer);
begin
WelcomeLabel1.Caption := WizardForm.WelcomeLabel1.Caption;
WelcomeLabel2.Caption := WizardForm.WelcomeLabel2.Caption;
PageNameLabel.Caption := WizardForm.PageNameLabel.Caption;
PageDescriptionLabel.Caption := WizardForm.PageDescriptionLabel.Caption;
FinishedHeadingLabel.Caption := WizardForm.FinishedHeadingLabel.Caption;
FinishedLabel.Caption := WizardForm.FinishedLabel.Caption;
end;
|
-------
Книги нужны, чтобы напоминать человеку, что его оригинальные мысли не так уж новы... Авраам Линкольн.
Отправлено: 21:15, 19-02-2009
| #454
|