Пользователь
Сообщения: 129
Благодарности: 76
Профиль
|
Отправить PM
| Цитировать
Цитата STRAYKER :
А как зделать в первом и втором окнах ? »
Можно попробовать
так
Код:
[Setup]
AppName=My Program
AppVerName=My Program
DefaultDirName={pf}\My Program
WizardImageFile=compiler:WizModernImage-IS.bmp
[code]
const
Text_color = clYellow;
var
MyPanel1, MyPanel2: TPanel;
procedure InitializeWizard();
begin
MyPanel1 := TPanel.Create(WizardForm);
with MyPanel1 do
begin
Align := alClient;
Parent := WizardForm;
end;
with WizardForm.WizardBitmapImage do
begin
Align := alClient;
Parent := MyPanel1;
end;
with TLabel.Create(WizardForm) do
begin
AutoSize := WizardForm.WelcomeLabel1.AutoSize;
WordWrap := WizardForm.WelcomeLabel1.WordWrap;
Left := WizardForm.WelcomeLabel1.Left;
Top := WizardForm.WelcomeLabel1.Top;
Width := WizardForm.WelcomeLabel1.Width;
Height := WizardForm.WelcomeLabel1.Height;
Caption := WizardForm.WelcomeLabel1.Caption;
Font.Size := WizardForm.WelcomeLabel1.Font.Size;
Font.Style := WizardForm.WelcomeLabel1.Font.Style;
Font.Color := Text_color;
TransParent := True;
Parent := MyPanel1;
end;
with TLabel.Create(WizardForm) do
begin
AutoSize := WizardForm.WelcomeLabel2.AutoSize;
WordWrap := WizardForm.WelcomeLabel2.WordWrap;
Left := WizardForm.WelcomeLabel2.Left;
Top := WizardForm.WelcomeLabel2.Top;
Width := WizardForm.WelcomeLabel2.Width;
Height := WizardForm.WelcomeLabel2.Height;
Caption := WizardForm.WelcomeLabel2.Caption;
Font.Size := WizardForm.WelcomeLabel2.Font.Size;
Font.Style := WizardForm.WelcomeLabel2.Font.Style;
Font.Color := Text_color;
TransParent := True;
Parent := MyPanel1;
end;
MyPanel2 := TPanel.Create(WizardForm);
with MyPanel2 do
begin
Align := alClient;
Parent := WizardForm;
end;
with WizardForm do
begin
with DirEdit do
begin
Left := ScaleX(40);
Top := ScaleY(137);
Parent := MyPanel2;
end;
with DirBrowseButton do
begin
Left := WizardForm.DirEdit.Left + WizardForm.DirEdit.Width + ScaleX(10);
Top := WizardForm.DirEdit.Top - ScaleY(1);
Parent := MyPanel2;
end;
end;
WizardForm.BackButton.BringToFront;
WizardForm.NextButton.BringToFront;
WizardForm.CancelButton.BringToFront;
end;
procedure CurPageChanged(CurPageID: Integer);
begin
MyPanel1.Hide;
MyPanel2.Hide;
if CurPageID = wpWelcome then
MyPanel1.Show;
if CurPageID = wpSelectDir then
begin
with TBitmapImage.Create(MyPanel2) do
begin
Align := alClient;
Bitmap := WizardForm.WizardBitmapImage.Bitmap;
Stretch := True;
Parent := MyPanel2;
end;
with TLabel.Create(WizardForm) do
begin
AutoSize := WizardForm.SelectDirBrowseLabel.AutoSize;
Left := WizardForm.DirEdit.Left;
Top := WizardForm.DirEdit.Top - ScaleY(30);
Width := WizardForm.SelectDirBrowseLabel.Width;
Height := WizardForm.SelectDirBrowseLabel.Height;
WordWrap := WizardForm.SelectDirBrowseLabel.WordWrap;
Caption := WizardForm.SelectDirBrowseLabel.Caption;
Font.Color := Text_color;
Font.Style := WizardForm.SelectDirBrowseLabel.Font.Style;
Font.Size := WizardForm.SelectDirBrowseLabel.Font.Size;
Transparent := True;
Parent := MyPanel2;
end;
with TLabel.Create(WizardForm) do
begin
AutoSize := WizardForm.SelectDirLabel.AutoSize;
Left := WizardForm.DirEdit.Left + ScaleX(45);
Top := WizardForm.DirEdit.Top - ScaleY(55);
Width := WizardForm.SelectDirLabel.Width;
Height := WizardForm.SelectDirLabel.Height;
WordWrap := WizardForm.SelectDirLabel.WordWrap;
Caption := WizardForm.SelectDirLabel.Caption;
Font.Color := Text_color;
Font.Style := WizardForm.SelectDirLabel.Font.Style;
Font.Size := WizardForm.SelectDirLabel.Font.Size;
Transparent := True;
Parent := MyPanel2;
end;
with TLabel.Create(WizardForm) do
begin
AutoSize := WizardForm.DiskSpaceLabel.AutoSize;
Left := WizardForm.DirEdit.Left;
Top := WizardForm.Bevel.Top - ScaleY(25);
Width := WizardForm.DiskSpaceLabel.Width;
Height := WizardForm.DiskSpaceLabel.Height;
WordWrap:= WizardForm.DiskSpaceLabel.WordWrap;
Caption := WizardForm.DiskSpaceLabel.Caption;
Font.Color := Text_color;
Font.Style := WizardForm.DiskSpaceLabel.Font.Style;
Font.Size := WizardForm.DiskSpaceLabel.Font.Size;
Transparent := True;
Parent := MyPanel2;
end;
with TLabel.Create(WizardForm) do
begin
AutoSize := WizardForm.PageNameLabel.AutoSize;
Left := WizardForm.PageNameLabel.Left;
Top := WizardForm.PageNameLabel.Top;
Width := WizardForm.PageNameLabel.Width;
Height := WizardForm.PageNameLabel.Height;
Caption := WizardForm.PageNameLabel.Caption;
Font.Color := Text_color;
Font.Style := WizardForm.PageNameLabel.Font.Style;
Font.Size := WizardForm.PageNameLabel.Font.Size;
Transparent := True;
Parent := MyPanel2;
end;
with TLabel.Create(WizardForm) do
begin
AutoSize := WizardForm.PageDescriptionLabel.AutoSize;
Left := WizardForm.PageDescriptionLabel.Left;
Top := WizardForm.PageDescriptionLabel.Top;
Width := WizardForm.PageDescriptionLabel.Width;
Height := WizardForm.PageDescriptionLabel.Height;
Caption := WizardForm.PageDescriptionLabel.Caption;
Font.Color := Text_color;
Font.Style := WizardForm.PageDescriptionLabel.Font.Style;
Font.Size := WizardForm.PageDescriptionLabel.Font.Size;
Transparent := True;
Parent := MyPanel2;
end;
with WizardForm.SelectDirBitmapImage do
begin
Left := WizardForm.DirEdit.Left;
Top := WizardForm.DirEdit.Top - ScaleY(62);
Stretch := True;
Parent := MyPanel2;
BringToFront;
end;
MyPanel2.Show;
end;
end;
Это сообщение посчитали полезным следующие участники:
Отправлено : 01:05, 17-11-2010
| #33