Вниз
Скачать: CL | DM;

Объясните мне пожалуйста,   Найти похожие ветки 

 
anod ©   (2002-07-09 22:28) [0]

почему такой код работает:
procedure TForm4.SpeedButton1Click(Sender: TObject);
var i:integer;
begin
TextListBox1.Items.Add(edit1.Text);
if RadioButton1.Checked then begin
pd4sb[n].Clear;
for i:= 0 to TextListBox1.Count-1 do
pd4sb[n].Add(TextListBox1.Items.Strings[i]);
end;
end;
, а такой - нет:
procedure TForm4.SpeedButton1Click(Sender: TObject);
var i:integer;
begin
TextListBox1.Items.Add(edit1.Text);
if RadioButton1.Checked then begin
pd4sb[n]:=TextListBox1.Items;
end;
end;


 
Nikolay ©   (2002-07-09 23:03) [1]

имхо проблема в TextListBox1.Items;


 
Gonza ©   (2002-07-09 23:27) [2]

я так понимаю pd4sb[n] это TStringList, а TextListBox1.Items - TStrings. Разные типы!

Напиши :

pd4sb[n].AddStrings(TextListBox1.Items)


 
anod ©   (2002-07-10 00:14) [3]

Спасибо.



Страницы: 1 вся ветка

Скачать: CL | DM;



Память: 0.45 MB
Время: 0.007 c
1-70796
Cowboy
2002-07-10 11:31
2002.07.22
Как узнать имя компоненты?


6-70847
Alibaba
2002-05-14 17:15
2002.07.22
TserverSocket


14-70908
lipskiy
2002-06-24 02:51
2002.07.22
Микропрограммки


1-70756
Виталик
2002-07-09 17:41
2002.07.22
ToolBar.flat := true ?????


3-70620
ioRaptor
2002-07-01 12:28
2002.07.22
Как создать таблицу в отделном файле (InterBase)




   Наверх