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

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

Аватара для nik1967

Старожил


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

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


Raf-9600,
типа так?
Код: Выделить весь код
[Setup]
AppName=My Application
AppVersion=1.5
DefaultDirName={pf}\My Application

[Components]
Name: Version; Description: Версия; Flags: fixed; Types: full compact custom;
Name: Version\101; Description: 1.01; Flags: exclusive;
Name: Version\102; Description: 1.02; Flags: exclusive;
Name: Version\103; Description: 1.03; Flags: exclusive; 
Name: Version\104; Description: 1.04; Flags: exclusive; Types: full;

[ Code]
var
  DRTF: TRichEditViewer;
  
  
procedure MemoKeyPress(Sender: TObject; var Key: Char);
begin
  Key := #0;
end;

procedure MemoKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState);
begin
  Key := 0;
end;

procedure RedesignWizardForm;
begin
  with WizardForm.ComponentsList do
  begin
    Width := ScaleX(212);
  end;

  DRTF := TRichEditViewer.Create(WizardForm);
  with DRTF do
  begin
    Name := 'DRTF';
    Parent := WizardForm.SelectComponentsPage;
    Left := ScaleX(220);
    Top := WizardForm.ComponentsList.Top;
    Width := ScaleX(197);
    Height := WizardForm.ComponentsList.Height;
    Color := clMenu;
    ReadOnly := True;
    ScrollBars := ssVertical;
    Text := '';
    OnKeyDown := @MemoKeyDown;
    OnKeyPress := @MemoKeyPress;
  end;
  DRTF.TabOrder := 4;
end;

type
  TComponentDesc = record Description: String; Index: Integer; end;

var
  Descs: array of TComponentDesc;
  Indx: Integer;
  Version: TWindowsVersion;

procedure ShowDescription(Sender: TObject; X, Y, Index: Integer; Area: TItemArea);
var i: Integer;
begin
  Indx:=-1;
  for i:= 0 to GetArrayLength(Descs)-1 do begin
  if (Descs[i].Index=Index) then begin Indx:=i; Break end; end;
  if (Indx >=0)and(Area=iaItem) then DRTF.Text:= Descs[Indx].Description; 
end;

procedure AddDescription(AIndex: Integer; ADescription: String);
var i, k: Integer;
begin
  i:= GetArrayLength(Descs); SetArrayLength(Descs, i+1);
  Descs[i].Description:= ADescription; Descs[i].Index:= AIndex-1;
end;

function needversion():boolean;
var Version: TWindowsVersion;
begin
  GetWindowsVersionEx (Version);
  Result:= (Version.Major = 6) and (Version.Minor = 0) and (Version.Build = 5999);
end;

procedure InitializeWizard();
begin
  RedesignWizardForm;
  WizardForm.ComponentsList.OnItemMouseMove:= @ShowDescription;
if needversion then AddDescription(2, 'текст 1.') else AddDescription(2, 'текст 1.1');
  AddDescription(3, 'текст 2.');
  AddDescription(4, 'текст 3.');
  AddDescription(5, 'текст 4.'); 
end;

-------
Если сообщение оказалось полезным для Вас, то помимо спасибо, можно нажать на "Полезное сообщение".

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

Отправлено: 12:19, 19-06-2012 | #279