Добрый вечер.
Подскажите в чем ошибка:
http://pixs.ru/showimage/Bezimyanni_...1_16349412.png
И вторая ошибка не выводит картинки,Ошибок не выдает, выбор осуществляется нормально, но картинки не появляются.
Код:
type
TForm1 = class(TForm)
Panel1: TPanel;
Label1: TLabel;
ComboBox1: TComboBox;
Label2: TLabel;
ComboBox2: TComboBox;
LabeledEdit1: TLabeledEdit;
LabeledEdit2: TLabeledEdit;
LabeledEdit3: TLabeledEdit;
LabeledEdit4: TLabeledEdit;
LabeledEdit5: TLabeledEdit;
LabeledEdit6: TLabeledEdit;
CheckBox1: TCheckBox;
BitBtn1: TBitBtn;
Memo1: TMemo;
Image1: TImage;
procedure FormCreate(Sender: TObject);
procedure ComboBox1Change(Sender: TObject);
procedure BitBtn1Click(Sender: TObject);
procedure ComboBox2Change(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
rho:real;
implementation
{$R *.dfm}
procedure TForm1.FormCreate(Sender: TObject);
begin
ComboBox1.ItemIndex:=0;
ComboBox2.ItemIndex:=0;
rho:=25;
TCheckBox.Checkbox:=True;
TCheckBox.TCaption:='Êîëüöåâîé';
LabeledEdit1.Visible:=True;
LabeledEdit2.Visible:=True;
LabeledEdit3.Visible:=True;
LabeledEdit4.Visible:=True;
LabeledEdit5.Visible:=True;
LabeledEdit6.Visible:=True;
end;
procedure TForm1.ComboBox1Change(Sender: TObject);
begin
case ComboBox1.ItemIndex of
0:rho:=25;
1:rho:=50;
2:rho:=100;
3:rho:=150;
4:rho:=300;
5:rho:=1000;
6:rho:=3000;
7:rho:=10000;
end; {Case}
end;
procedure TForm1.BitBtn1Click(Sender: TObject);
begin
memo1.Lines.Add(ComboBox1.Items[ComboBox1.ItemIndex]+' rho = '+FloatToStr(rho)+' Îì*ì');
end;
procedure TForm1.ComboBox2Change(Sender: TObject);
begin
case ComboBox2.itemindex of
0: begin
Image1.Picture.LoadFromFile('1.jpg');
LabeledEdit1.Visible:=True;
LabeledEdit2.Visible:=True;
LabeledEdit3.Visible:=false;
LabeledEdit4.Visible:=false;
LabeledEdit5.Visible:=false;
LabeledEdit6.Visible:=false;
Image1.Visible:=false;
end; {0}
1: begin
Image1.Picture.LoadFromFile('2.jpg');
LabeledEdit1.Visible:=True;
LabeledEdit2.Visible:=True;
LabeledEdit3.Visible:=false;
LabeledEdit4.Visible:=false;
LabeledEdit5.Visible:=false;
LabeledEdit6.Visible:=false;
Image1.Visible:=false;
end; {1}
2: begin
Image1.Picture.LoadFromFile('2.jpg');
LabeledEdit1.Visible:=True;
LabeledEdit2.Visible:=True;
LabeledEdit3.Visible:=false;
LabeledEdit4.Visible:=false;
LabeledEdit5.Visible:=false;
LabeledEdit6.Visible:=false;
Image1.Visible:=false;
end; {2}
3: begin
Image1.Picture.LoadFromFile('3.jpg');
LabeledEdit1.Visible:=True;
LabeledEdit2.Visible:=True;
LabeledEdit3.Visible:=True;
LabeledEdit4.Visible:=false;
LabeledEdit5.Visible:=false;
LabeledEdit6.Visible:=false;
Image1.Visible:=false;
end; {3}
end; {case }
end;
end.