Читайте также: |
|
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, ExtCtrls, StdCtrls, ImgList,jpeg;
type
TForm1 = class(TForm)
ListBox1: TListBox;
Image1: TImage;
procedure ListBox1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.ListBox1Click(Sender: TObject);
begin
if listbox1.ItemIndex = 0
then image1.Picture.LoadFromFile('cat.jpg');
if listbox1.ItemIndex = 1
then image1.Picture.LoadFromFile('dog.jpg');
if listbox1.ItemIndex = 2
then image1.Picture.LoadFromFile('panda.jpg');
if listbox1.ItemIndex = 3
then image1.Picture.LoadFromFile('monkey.jpg');
if listbox1.ItemIndex = 4
then image1.Picture.LoadFromFile('pig.jpg');
if listbox1.ItemIndex = 5
then image1.Picture.LoadFromFile('rabbit.jpg');
if listbox1.ItemIndex = 6
then image1.Picture.LoadFromFile('snake.jpg');
if listbox1.ItemIndex = 7
then image1.Picture.LoadFromFile('bird.jpg');
if listbox1.ItemIndex = 8
then image1.Picture.LoadFromFile('squirrel.jpg');
if listbox1.ItemIndex = 9
then image1.Picture.LoadFromFile('wolf.jpg');
if listbox1.ItemIndex = 10
then image1.Picture.LoadFromFile('bear.jpg');
if listbox1.ItemIndex= 11
then image1.Picture.LoadFromFile('crocodile.jpg');
if listbox1.ItemIndex = 12
then image1.Picture.LoadFromFile('tiger.jpg');
if listbox1.ItemIndex = 13
then image1.Picture.LoadFromFile('horse.jpg');
if listbox1.ItemIndex = 14
then image1.Picture.LoadFromFile('fish.jpg');
if listbox1.ItemIndex= 15
then image1.Picture.LoadFromFile('butterfly.jpg');
end;
end.
Апробація
Дата добавления: 2015-07-17; просмотров: 78 | Нарушение авторских прав
<== предыдущая страница | | | следующая страница ==> |
Текст програми | | | Дипломдық бітіру жұмысының өзектілігі. |