unit
Unit1;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls,
Forms, Dialogs, ExtCtrls, StdCtrls, Jpeg;
type
TForm1 = class(TForm)
RadioGroup1: TRadioGroup;
FileListBox1: TFileListBox;
DriveComboBox1: TDriveComboBox;
Image1: TImage;
DirectoryListBox1: TDirectoryListBox;
procedure FileListBox1Change(Sender: TObject);
private
{ Déclarations privées
}
public
{ Déclarations publiques
}
end;
var
Form1: TForm1;
implementation
{$R
*.DFM}
procedure
TForm1.FileListBox1Change(Sender: TObject);
begin
if FileListbox1.ItemIndex>=0 then //Si
il y a un ou des fichiers
begin
Image1.Picture.LoadFromFile(FileListBox1.FileName); //Charge
l'image
TJPEGImage(Image1.Picture.Graphic).Scale:=
TJPegScale(RadioGroup1.ItemIndex);//Redimensionne
l'image
end;
end;
end.
|