1.如何将一LISTBOX里的内容,分别显示在其他2个LISTBOX中,例如:
LISTBOX1: 若LISTBOX2里为: 则LISTBOX3里显示为:
11 22 11
22 33 44
33 55 66
44 77
55 88
66
77
88
如何实现这样的功能?
2.将字符串STR中的内容添加到MEMO1中.是否用MEMO1.LINES.ADD(STR)?
LISTBOX1: 若LISTBOX2里为: 则LISTBOX3里显示为:
11 22 11
22 33 44
33 55 66
44 77
55 88
66
77
88
如何实现这样的功能?
2.将字符串STR中的内容添加到MEMO1中.是否用MEMO1.LINES.ADD(STR)?
用这个实现。
ListBox2.Items.Add('22');
...
ListBox3.Items.Add('11');
...2、
MEMO1.LINES.ADD(STR)
我就是这个意思
begin
if listbox3.Count =0 then
begin
listbox3.Items.Add (Items.Strings[itemindex]);
exit;
end; for i:=0 to listbox3.Count-1 do
begin
if listbox3.Items.Strings[i]=Items.Strings[itemindex] then
begin
exit;
end;
end;
listbox3.Items.Add (Items.Strings[itemindex]);
end
参考一下