var CB:TComboBox;
aaa:integer;
cm,ck:integer;
.........
.........cm:= CB.items.count;
for ck:=1 to cm do
if CB.items[ck]<>inttostr(aaa) then
CB.items.add(inttostr(aaa));
用CB.items[ck]好像不对,要用什么?谢谢
aaa:integer;
cm,ck:integer;
.........
.........cm:= CB.items.count;
for ck:=1 to cm do
if CB.items[ck]<>inttostr(aaa) then
CB.items.add(inttostr(aaa));
用CB.items[ck]好像不对,要用什么?谢谢
解决方案 »
- 问:QR报表中QRDBText的问题--跪谢!!
- errorcode:=0;是什么意思呀,
- TShockwaveflash在窗体改变时大小改变的问题?解决后马上结贴
- 怎么样在程序中指定EXCEL单元格格式?
- SOS!!如何在程序中实现对打印机的控制,及打印完后,让打印机退纸!!!急!!
- 在做一个软件,这个软件的资料登记中有个删除标记的选项,是让打沟或者不打勾的,究竟这个功能是做什么用的
- 一个小问题
- 大家把自己最喜欢的vcl拿出来共享吧,进来有分!(第一贴)
- 生产者与消费者的问题~~~
- 想找个工作,到哪儿去最好?
- inttostr(Count mod 16)如何变成一个Char值??
- 改写在那个事件里面??
cm:= CB.items.count;
for ck:=0 to cm-1 do
if CB.items[ck]<>inttostr(aaa) then
CB.items.add(inttostr(aaa));而且不用这么麻烦,这样就可以了:
if CB.items.indexof(inttostr(aaa)) = -1 then
CB.items.add(inttostr(aaa));
CB.items.add(inttostr(aaa));
发错了,,
if strtoint(CB.items[ck])<>(aaa) then
CB.items.add(inttostr(aaa));
谢谢ghyghost和sysu了!!!