Имя пользователя:
Пароль:
 

Показать сообщение отдельно

Аватара для Johny777

Ветеран


Сообщения: 649
Благодарности: 444

Профиль | Отправить PM | Цитировать


Yury_Prizrak,
вот такой пример есть:
читать дальше »

Код: Выделить весь код
[Setup]
AppName=Quake Live
AppVerName="Quake Live"
AppPublisher=Mio Dark Project
CreateAppDir=no

[Languages]
Name: ru; MessagesFile: compiler:Languages\Russian.isl;

[Types]
Name: "full"; Description: "Все компоненты";
Name: "custom"; Description: "Выбрать компоненты"; Flags:  iscustom

[Components]
Name: "main"; Description: "Cтандартные файлы Quake Live"; Types: full custom; Flags: fixed
Name: "main2"; Description: "Премиум файлы Quake Live"; Types: full custom;
Name: "plug"; Description: "Плагин Quake Live"; Types: full custom;
Name: "browser"; Description: "Портативный Firefox под Quake Live"; Types: full custom;
Name: "manual"; Description: "Руководство и Награды"; Types: full custom;
Name: "anti"; Description: "Античит PunkBuster"; Types: full custom;

[CustomMessages]
HeaderLabelPage=Выберите тип вашего аккаунта
MyRadioCaption_1=Standart
MyRadioCaption_2=Premium / Pro
PageTextHeader=На этой странице Вы можете выбрать тип вашего аккаунта, который вы используете в игре.
MyText_1=Будут установлены файлы которые доступны для игроков без подписки.
MyText_2=Будут установлены файлы которые доступны для игроков с Premium/Pro подпиской.


[code]
var
  MyNewPage: TWizardPage;
  MyRadioBtn:ArraY[0..1]of TNewRadioButton;

procedure GetInstType;
begin
  WizardForm.ComponentsList.ItemEnabled[1]:= MyRadioBtn[1].Checked or not MyRadioBtn[0].Checked;
  WizardForm.ComponentsList.Checked[1]:=MyRadioBtn[1].Checked or not MyRadioBtn[0].Checked;
  WizardForm.ComponentsList.Checked[4]:=MyRadioBtn[1].Checked or not MyRadioBtn[0].Checked;
end;

procedure GetInstTypePage;
var
  i:integer;
begin
  MyNewPage := CreateCustomPage(wpWelcome,
  ExpandConstant('{cm:HeaderLabelPage}'), '');

  with TNewStaticText.Create(WizardForm) do
  begin
    Width := WizardForm.InnerNotebook.Width;
    Height := ScaleY(26);
    WordWrap := True;
    Caption := ExpandConstant('{cm:PageTextHeader}');
    Parent := MyNewPage.Surface;
  end;

  for i:=0 to 1 do
  begin
    MyRadioBtn[i] := TNewRadioButton.Create(WizardForm);
    with MyRadioBtn[i] do
    begin
      Parent := MyNewPage.Surface;
      Top := ScaleY(50+i*70);
      Width := ScaleX(150);
      case i of
        0: begin
          Caption := ExpandConstant('{cm:MyRadioCaption_1}');
          Checked := True;
        end;
        1:Caption := ExpandConstant('{cm:MyRadioCaption_2}');
      end;
    end;

    with TNewStaticText.Create(WizardForm) do
    begin
      Parent := MyNewPage.Surface;
      SetBounds(ScaleX(16),ScaleY(68+i*70),WizardForm.InnerNotebook.Width - ScaleX(60),ScaleY(26));
      WordWrap := True;
      case i of
        0:Caption := ExpandConstant('{cm:MyText_1}');
        1:Caption := ExpandConstant('{cm:MyText_2}');
      end;
    end;
  end;
end;

function ShouldSkipPage(PageID: Integer): Boolean;
begin
  if (PageID <= wpSelectDir)
    and (PageID = wpReady)
      and (MyRadioBtn[1].Checked)
        then Result := True;
end;

procedure InitializeWizard();
begin
  GetInstTypePage;
end;

procedure CurPageChanged(CurPageID: Integer);
begin
  if CurPageID=wpSelectComponents then GetInstType;
end;

или на основе предыдущего, но попроще и как ты хотел
читать дальше »

Код: Выделить весь код
#define MyAppName "test"

[Setup]
AppName={#MyAppName}
AppVerName={#MyAppName}
DefaultDirName={pf}\{#MyAppName}
UsePreviousAppDir=false


[Components]
Name: a; Description: 1;
Name: b; Description: 2;
Name: c; Description: 3;
Name: d; Description: 4;
Name: e; Description: 5;


[code]
var
  Page: TInputOptionWizardPage;

procedure InitializeWizard();
begin
  Page:= CreateInputOptionPage(wpSelectDir, 'тип установки', '', '', false, false);
	Page.Add('полная версия');
	WizardForm.TypesCombo.Hide;
end;

procedure CurPageChanged(CurPageID: Integer);
begin
  if CurPageID = wpSelectComponents then 
  begin
    WizardForm.ComponentsList.ItemEnabled[1]:= Page.Values[0];
    WizardForm.ComponentsList.ItemEnabled[4]:= Page.Values[0];
  end;
end;


detiedyatosla,
никак
родные лейблы не поддерживают прозрачность
пересоздавай и используй прозрачность
http://forum.oszone.net/post-1937887-305.html

Последний раз редактировалось Johny777, 27-06-2012 в 13:24.

Это сообщение посчитали полезным следующие участники:

Отправлено: 11:29, 27-06-2012 | #321