Скрипты Inno Setup. Помощь и советы [часть 6]

Ответить
 • Просмотры: 30
Аватара пользователя
saurn

Re: Скрипты Inno Setup. Помощь и советы [часть 6]

Сообщение saurn »

Dodakaedr, шрифт контролов TNewStaticText при включении прозрачности фона лишается свойства Color. Как вариант, можно использовать свои контролы TLabel.
Аватара пользователя
vint56

Re: Скрипты Inno Setup. Помощь и советы [часть 6]

Сообщение vint56 »

Dodakaedr у простого лэйбала тоже есть параметр празрачности Transparent := True;




читать дальше »


[Setup]

AppName=My Application

AppVersion=1.5

DefaultDirName={pf}\My Application


Код: Выделить всё


var

  Label1: TLabel;



procedure InitializeWizard();

begin

  Label1 := TLabel.Create(WizardForm);

  with Label1 do

  begin

    Transparent := True;

    Parent := WizardForm.SelectDirPage;

    Caption := 'Dodakaedr';

    Font.Color := clRed;

    Font.Height := -16;

    Font.Name := 'Tahoma';

    Font.Style := [fsBold];

    ParentFont := False;

    Left := ScaleX(152);

    Top := ScaleY(136);

    Width := ScaleX(113);

    Height := ScaleY(19);

  end;

end;
Аватара пользователя
Dodakaedr

Re: Скрипты Inno Setup. Помощь и советы [часть 6]

Сообщение Dodakaedr »

vint56, оно, только надо вместо NewStaticText1, а он заблокирован. Как быть?
Аватара пользователя
vint56

Re: Скрипты Inno Setup. Помощь и советы [часть 6]

Сообщение vint56 »

Dodakaedr


читать дальше »


[Setup]

AppName=My Application

AppVersion=1.5

DefaultDirName={pf}\My Application



[Files]

DestName: "WizardForm.BitmapImage1.bmp"; Source: "E:\Картинки\mostkorol2_1024.bmp"; Flags: dontcopy solidbreak


Код: Выделить всё


var

  Panel1: TPanel;

  BitmapImage1: TBitmapImage;

  Label1: TLabel;

  Label2: TLabel;



procedure InitializeWizard();

begin

  WizardForm.MainPanel.Hide;

  { Panel1 }

  Panel1 := TPanel.Create(WizardForm);

  with Panel1 do

  begin

    Parent := WizardForm.InnerPage;

    Left := ScaleX(0);

    Top := ScaleY(0);

    Width := ScaleX(499);

    Height := ScaleY(57);

    BevelOuter := bvNone;

  end;

  { BitmapImage1 }

  BitmapImage1 := TBitmapImage.Create(WizardForm);

  with BitmapImage1 do

  begin

    Parent := Panel1;

    Left := ScaleX(0);

    Top := ScaleY(0);

    Width := ScaleX(497);

    Height := ScaleY(57);

    ExtractTemporaryFile('WizardForm.BitmapImage1.bmp');

    Bitmap.LoadFromFile(ExpandConstant('{tmp}\WizardForm.BitmapImage1.bmp'));

  end;

  { Label1 }

  Label1 := TLabel.Create(WizardForm);

  with Label1 do

  begin

    Parent := Panel1;

    Caption := 'Выбор папки установки';

    Font.Color := clWhite;

    Font.Height := -12;

    Font.Name := 'Tahoma';

    Font.Style := [];

    ParentFont := False;

    Left := ScaleX(16);

    Top := ScaleY(8);

    Width := ScaleX(134);

    Height := ScaleY(14);

  end;

  { Label2 }

  Label2 := TLabel.Create(WizardForm);

  with Label2 do

  begin

    Parent := Panel1;

    Caption := 'В какую папку вы хотите установить {#SetupSetting("AppName")}?';

    Font.Color := clWhite;

    Font.Height := -12;

    Font.Name := 'Tahoma';

    Font.Style := [];

    ParentFont := False;

    Left := ScaleX(24);

    Top := ScaleY(24);

    Width := ScaleX(385);

    Height := ScaleY(14);

  end;

end;



Вот обновленый пример


[url=#]читать дальше »[/url]

[Setup]

AppName=My Application

AppVersion=1.5

DefaultDirName={pf}\My Application



[Files]

DestName: "WizardForm.BitmapImage1.bmp"; Source: "E:\Картинки\mostkorol2_1024.bmp"; Flags: dontcopy solidbreak



[code]

var

PageNameLabel, PageDescriptionLabel: TLabel;

MainPanel: TPanel;

BitmapImage: TBitmapImage;

procedure InitializeWizard();

begin

  WizardForm.MainPanel.Hide;

  MainPanel := TPanel.Create(WizardForm);

  with MainPanel do

  begin

    Parent := WizardForm.InnerPage;

    Left := ScaleX(0);

    Top := ScaleY(0);

    Width := ScaleX(499);

    Height := ScaleY(57);

    BevelOuter := bvNone;

  end;

  BitmapImage := TBitmapImage.Create(WizardForm);

  with BitmapImage do

  begin

    Parent := MainPanel;

    Left := ScaleX(0);

    Top := ScaleY(0);

    Width := ScaleX(497);

    Height := ScaleY(57);

    ExtractTemporaryFile('WizardForm.BitmapImage1.bmp');

    Bitmap.LoadFromFile(ExpandConstant('{tmp}\WizardForm.BitmapImage1.bmp'));

  end;

  PageNameLabel:=TLabel.Create(WizardForm);

  with PageNameLabel do begin

    AutoSize:=False;

    SetBounds(ScaleX(24), ScaleY(10), ScaleX(400), ScaleY(30));

    Transparent:=True;

    Font.Name:= 'Georgia';

    Font.Size:= 8;

    Font.Color:=clWhite;;

    Parent:=MainPanel;

  end;

  PageDescriptionLabel:=TLabel.Create(WizardForm);

  with PageDescriptionLabel do begin

    AutoSize:=False;

    SetBounds(ScaleX(40), ScaleY(26), ScaleX(389), ScaleY(50));

    Wordwrap:= True;

    Transparent:=True;

    Font.Name:= 'Georgia';

    Font.Size:= 8;

    Font.Color:=clWhite;;

    Parent:=MainPanel;

  end;

end;



procedure CurPageChanged(CurPageID: Integer);

begin

  PageNameLabel.Caption:=WizardForm.PageNameLabel.Caption

  PageDescriptionLabel.Caption:=WizardForm.PageDescriptionLabel.Caption

end;



 

а можно чтобы только текст менялся без картинки




[url=#]читать дальше »[/url]

[Setup]

AppName=My Application

AppVersion=1.5

DefaultDirName={pf}\My Application



[code]

var

  PageNameLabel, PageDescriptionLabel: TLabel;

  MainPanel: TPanel;

  BitmapImage: TBitmapImage;

procedure InitializeWizard();

begin

  WizardForm.MainPanel.Hide;

  MainPanel := TPanel.Create(WizardForm);

  with MainPanel do

  begin

    Parent := WizardForm.InnerPage;

    Left := ScaleX(0);

    Top := ScaleY(0);

    Width := ScaleX(499);

    Height := ScaleY(57);

    BevelOuter := bvNone;

  end;

  PageNameLabel:=TLabel.Create(WizardForm);

  with PageNameLabel do begin

    AutoSize:=False;

    SetBounds(ScaleX(24), ScaleY(10), ScaleX(400), ScaleY(30));

    Transparent:=True;

    Font.Name:= 'Georgia';

    Font.Size:= 8;

    Font.Color:=$000000;

    Parent:=MainPanel;

  end;

  PageDescriptionLabel:=TLabel.Create(WizardForm);

  with PageDescriptionLabel do begin

    AutoSize:=False;

    SetBounds(ScaleX(40), ScaleY(26), ScaleX(389), ScaleY(50));

    Wordwrap:= True;

    Transparent:=True;

    Font.Name:= 'Georgia';

    Font.Size:= 8;

    Font.Color:=$000000;

    Parent:=MainPanel;

  end;

end;



procedure CurPageChanged(CurPageID: Integer);

begin

  PageNameLabel.Caption:=WizardForm.PageNameLabel.Caption

  PageDescriptionLabel.Caption:=WizardForm.PageDescriptionLabel.Caption

end;
Аватара пользователя
Dodakaedr

Re: Скрипты Inno Setup. Помощь и советы [часть 6]

Сообщение Dodakaedr »

vint56, а можно чтобы только текст менялся без картинки?
Аватара пользователя
Dodakaedr

Re: Скрипты Inno Setup. Помощь и советы [часть 6]

Сообщение Dodakaedr »

vint56, тоисть чтобы картинка оставалась а текст менялся...
Аватара пользователя
Nordek

Re: Скрипты Inno Setup. Помощь и советы [часть 6]

Сообщение Nordek »

Цитата vint56:



нет но тогда придётся скрывать другие элементы что находятся на стандартном WizardForm.MainPanel потому мне было проше
Скрипты Inno Setup. Помощь и советы [часть 6]




Теперь именно то что мне нужно)) Спс!
Аватара пользователя
vint56

Re: Скрипты Inno Setup. Помощь и советы [часть 6]

Сообщение vint56 »

Nordek Понял учту

Dodakaedr



Код:

Код: Выделить всё

[Setup]
AppName=My Application
AppVersion=1.5
DefaultDirName={pf}\My Application
[Files]
DestName: "WizardForm.BitmapImage1.bmp"; Source: "E:\Картинки\mostkorol2_1024.bmp"; Flags: dontcopy solidbreak
[code ]
var
  PageNameLabel, PageDescriptionLabel: TLabel;
  MainPanel: TPanel;
  BitmapImage: TBitmapImage;
procedure InitializeWizard();
begin
  WizardForm.MainPanel.Hide;
  MainPanel := TPanel.Create(WizardForm);
  with MainPanel do
  begin
    Parent := WizardForm.InnerPage;
    Left := ScaleX(0);
    Top := ScaleY(0);
    Width := ScaleX(499);
    Height := ScaleY(57);
    BevelOuter := bvNone;
  end;
  BitmapImage := TBitmapImage.Create(WizardForm);
  with BitmapImage do
  begin
    Parent := MainPanel;
    Left := ScaleX(0);
    Top := ScaleY(0);
    Width := ScaleX(497);
    Height := ScaleY(57);
    ExtractTemporaryFile('WizardForm.BitmapImage1.bmp');
    Bitmap.LoadFromFile(ExpandConstant('{tmp}\WizardForm.BitmapImage1.bmp'));
  end;
  PageNameLabel:=TLabel.Create(WizardForm);
  with PageNameLabel do begin
    AutoSize:=False;
    SetBounds(ScaleX(24), ScaleY(10), ScaleX(400), ScaleY(30));
    Transparent:=True;
    Font.Name:= 'Georgia';
    Font.Size:= 8;
    Font.Color:=clWhite;;
    Parent:=MainPanel;
  end;
  PageDescriptionLabel:=TLabel.Create(WizardForm);
  with PageDescriptionLabel do begin
    AutoSize:=False;
    SetBounds(ScaleX(40), ScaleY(26), ScaleX(389), ScaleY(50));
    Wordwrap:= True;
    Transparent:=True;
    Font.Name:= 'Georgia';
    Font.Size:= 8;
    Font.Color:=clWhite;;
    Parent:=MainPanel;
  end;
end;
procedure CurPageChanged(CurPageID: Integer);
begin
  PageNameLabel.Caption:=WizardForm.PageNameLabel.Caption;
  PageDescriptionLabel.Caption:=WizardForm.PageDescriptionLabel.Caption;
  case CurPageID of
  wpSelectDir:
  begin
    PageNameLabel.Caption:='Мой текст';
    PageDescriptionLabel.Caption:='Мой текст';
  end;
  wpSelectComponents:
  begin
    PageNameLabel.Caption:='Мой текст';
    PageDescriptionLabel.Caption:='Мой текст';
  end;
  wpSelectProgramGroup:
  begin
    PageNameLabel.Caption:='Мой текст';
    PageDescriptionLabel.Caption:='Мой текст';
  end;
  wpSelectTasks:
  begin
    PageNameLabel.Caption:='Мой текст';
    PageDescriptionLabel.Caption:='Мой текст';
  end;
  wpReady:
  begin
    PageNameLabel.Caption:='Мой текст';
    PageDescriptionLabel.Caption:='Мой текст';
  end;
  wpPreparing:
  begin
    PageNameLabel.Caption:='Мой текст';
    PageDescriptionLabel.Caption:='Мой текст';
  end;
  wpInstalling:
  begin
    PageNameLabel.Caption:='Мой текст';
    PageDescriptionLabel.Caption:='Мой текст';
  end;
  wpInfoAfter:
  begin
    PageNameLabel.Caption:='Мой текст';
    PageDescriptionLabel.Caption:='Мой текст';
  end;
 end;
end;
Аватара пользователя
Dodakaedr

Re: Скрипты Inno Setup. Помощь и советы [часть 6]

Сообщение Dodakaedr »

vint56, Огромное спасибо!!!



vint56, а обязательно надо менять полностью main panel?
Ответить

Вернуться в «Автоматическая установка приложений»