怎么将table1数据库的所有字段增加combobox1中。 用Fields集合啊,可能是叫这个名称吧,记不清了Fields[0].FieldName等等了,多看看Delphi的帮助吧,这样的问题怎能成为问题呢! 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 with query1 dobegin first; while not eof do begin Combobox1.Items.append(FieldValues['字段名']); next; end;end; var i:integer;begin ComboBox1.Items.Clear; for i:=0 to Table1.FieldDefs.Count-1 do combobox1.Items.Add(table1.FieldDefs.Items[i].Name); var i:integer;begin ComboBox1.Items.Clear; for i:=0 to Table1.FieldDefs.Count-1 do combobox1.Items.Add(table1.FieldDefs.Items[i].Name); query1.open;combobox1.Items.Assign(query1.fieldlist);query1.close; 其实一般情况下不需要这样做。用DBLookupCombobox不就可以了吗?自己手工加入Combox是很慢的。 Delphi 7一些软件界面的请教! 如何把MDB数据库中的信息显示到listView或者listBosx中 delphi做的程序会破坏操作系统吗 过年前最后一次散分 用IDHTTP上传文件时,如何在上传工作中获取上传速度? 怎么做类似于windows资源管理器窗口中可以左右拖动的效果? !?FastReport预览和实际打印输出有很大差别!? 在线等待:我在设置好DBGrid后,出现的是英文标记列,我如何改为中文列! 如何获得谷歌的源文件 Button再按下ALT键时,会莫名其妙隐藏? 怎样抓取屏幕内容 能不能将ico存成bmp
begin
first;
while not eof do
begin
Combobox1.Items.append(FieldValues['字段名']);
next;
end;
end;
begin
ComboBox1.Items.Clear;
for i:=0 to Table1.FieldDefs.Count-1 do
combobox1.Items.Add(table1.FieldDefs.Items[i].Name);
begin
ComboBox1.Items.Clear;
for i:=0 to Table1.FieldDefs.Count-1 do
combobox1.Items.Add(table1.FieldDefs.Items[i].Name);
combobox1.Items.Assign(query1.fieldlist);
query1.close;
自己手工加入Combox是很慢的。