Имя пользователя:
Пароль:  
Помощь | Регистрация | Забыли пароль?  

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

Аватара для Johny777

Ветеран


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

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


1.
как во втором примере (если я правильно понял)

2.
размести на панелях
http://sendfile.su/604099
код:
читать дальше »
Код: Выделить весь код
[Setup]
AppName=Test Mouse Event
AppVersion=1.5
DefaultDirName={pf}\My Application
SolidCompression=yes
Compression=lzma/ultra
PrivilegesRequired=none
OutputDir=userdocs:Inno Setup Examples Output

[Files]
Source: "Cremator_poster.bmp"; DestDir: {app}; Check: A
Source: "Airex_tower_large.bmp"; DestDir: {app}; Check: B

Source: "Alyx_Vance_head.bmp"; DestDir: {app}; Check: C
Source: "Gordon_head_cover.bmp"; DestDir: {app};  Check: D


[  Code]

var
  Panel1: TPanel;
  NewRadioButton1: TNewRadioButton;
  NewRadioButton2: TNewRadioButton;
  Panel2: TPanel;
  NewRadioButton3: TNewRadioButton;
  NewRadioButton4: TNewRadioButton;
  
function A: Boolean;
begin
  Result:=NewRadioButton1.Checked;
end;

function B: Boolean;
begin
  Result:=NewRadioButton2.Checked;
end;

function C: Boolean;
begin
  Result:=NewRadioButton3.Checked;
end;


function D: Boolean;
begin
  Result:=NewRadioButton4.Checked;
end;


procedure InitializeWizard();
begin
  { Panel1 }
  Panel1 := TPanel.Create(WizardForm);
  with Panel1 do
  begin
    Parent := WizardForm.SelectDirPage;
    Left := ScaleX(104);
    Top := ScaleY(104);
    Width := ScaleX(185);
    Height := ScaleY(57);
    BevelOuter := bvNone;
    Caption := '';
  end;

  { NewRadioButton1 }
  NewRadioButton1 := TNewRadioButton.Create(WizardForm);
  with NewRadioButton1 do
  begin
    Parent := Panel1;
    Left := ScaleX(16);
    Top := ScaleY(8);
    Width := ScaleX(113);
    Height := ScaleY(17);
    Checked := True;
  end;

  { NewRadioButton2 }
  NewRadioButton2 := TNewRadioButton.Create(WizardForm);
  with NewRadioButton2 do
  begin
    Parent := Panel1;
    Left := ScaleX(16);
    Top := ScaleY(32);
    Width := ScaleX(113);
    Height := ScaleY(17);
  end;

  { Panel2 }
  Panel2 := TPanel.Create(WizardForm);
  with Panel2 do
  begin
    Parent := WizardForm.SelectDirPage;
    Left := ScaleX(104);
    Top := ScaleY(168);
    Width := ScaleX(185);
    Height := ScaleY(62);
    BevelOuter := bvNone;
    Caption := '';
  end;

  { NewRadioButton3 }
  NewRadioButton3 := TNewRadioButton.Create(WizardForm);
  with NewRadioButton3 do
  begin
    Parent := Panel2;
    Left := ScaleX(16);
    Top := ScaleY(0);
    Width := ScaleX(113);
    Height := ScaleY(17);
  end;

  { NewRadioButton4 }
  NewRadioButton4 := TNewRadioButton.Create(WizardForm);
  with NewRadioButton4 do
  begin
    Parent := Panel2;
    Left := ScaleX(16);
    Top := ScaleY(24);
    Width := ScaleX(113);
    Height := ScaleY(17);
    Checked := True;
  end;
end;


3.
Цитата GoshaPolo:
Например на картинку нет события OnEnter »
есть "OnMouseEnter"
архив с фалами
http://sendfile.su/604084
код:
читать дальше »
Код: Выделить весь код
[Setup]
AppName=Test Mouse Event
AppVersion=1.5
DefaultDirName={pf}\My Application
SolidCompression=yes
Compression=lzma/ultra
PrivilegesRequired=none
OutputDir=userdocs:Inno Setup Examples Output

[Files]
Source: "Cremator_poster.bmp"; Flags: dontcopy solidbreak
Source: "Airex_tower_large.bmp"; Flags: dontcopy solidbreak

[  Code]
var
  Pic: TBitmapImage;

procedure Navodim_na_kartinku(Sender: TObject); /// при наведении
begin
   Pic.Bitmap.LoadFromFile(ExpandConstant('{tmp}\Airex_tower_large.bmp'));  /// грузим в картинку другой файл картинки
end;

//procedure Navodim_na_kartinku(Sender: TObject; Shift: TShiftState; X, Y: Integer); /// при наведении
//begin
//   Pic.Bitmap.LoadFromFile(ExpandConstant('{tmp}\Airex_tower_large.bmp'));  /// грузим в картинку другой файл картинки
//end;
  
procedure Ubiraem_Mish(Sender: TObject); /// уводим курсор с картинки
begin
   Pic.Bitmap.LoadFromFile(ExpandConstant('{tmp}\Cremator_poster.bmp'));  /// грузим в картинку файл картинки по умолчанию
end;



procedure InitializeWizard();
begin

  with WizardForm do
  begin
    AutoScroll := False;
    ClientHeight := ScaleY(637);
    ClientWidth := ScaleX(523);
    OuterNotebook.Visible := False;
    CancelButton.SetBounds(ScaleX(450), ScaleY(600), ScaleX(60), ScaleY(20));
    Bevel.Hide;
  end;
    
    ExtractTemporaryFile('Cremator_poster.bmp'); // извлекаем в темп обе картинки
    ExtractTemporaryFile('Airex_tower_large.bmp');
        
    Pic := TBitmapImage.Create(WizardForm) 
    with Pic do
      begin
      Parent := WizardForm;
      Left := ScaleX(20);
      Top := ScaleY(20);
      Bitmap.LoadFromFile(ExpandConstant('{tmp}\Cremator_poster.bmp'));
      AutoSize := True;
      
      OnMouseEnter := @Navodim_na_kartinku;
      //OnMouseMove := @Navodim_na_kartinku;    /// при наведении (вариант)
      OnMouseLeave := @Ubiraem_Mish; /// когда курсор за пределами картинки
    end;

end;


procedure CurPageChanged(CurPageID: Integer); 
begin
  WizardForm.NextButton.Visible := False;
end;

Последний раз редактировалось Johny777, 30-05-2012 в 15:13.

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

Отправлено: 12:41, 30-05-2012 | #111