谢谢,最好有个例子
解决方案 »
- delphi 怎么读取oracle long raw字段
- 同一层有多个同类的tpanel,这样用findwindowex就需要多次调用才能找到自己想要的那个panel的句柄,有没有简单一点的方法呢?
- 求一十进制转成十六进制的函数据代码
- 为什么if trim(combobox1.Text):='' then不能通过编译
- VC6写的DLL在DELPHI6中调用提示找不到函数!!
- 将文件的属性设为隐藏
- 询问有关dx控件的参考资料!
- 如何得到刚加入的一条记录 ?
- 大家来帮忙!十万分感谢!
- 有关数据库的一个问题!
- treeview的问题,请各位帮给以解决!
- createoleobject declare 时出错。
begin
open;
first;
while not eof then
begin
ComboBox1.Items.Add(FieldByName('name').AsString);
Next;
end;
end;
这种做法,通常用于用户编辑界面,在combobox中显示可供用户选择的数据,节省时间,也可实现数据的某种约束。方法(例如:进、销、存管理中,制作订单,combobox显示运输方式--空运、):1.combobox属性:comboboxlist
2.将表中的一个字段的全部值combobox.item.add(adoquery1.fieldbyname('字段').asstring)
3.combobox.itemindex:=0//获得运输方式
procedure Get_Shipping;
var temp_int:integer;
begin
try
...
if temp_adoquery.eof:=false then
begin
combobox.item.clear;
for temp_int:=1 to temp_adoquery.rdcount do
begin combobox.item.add(adoquery1.fieldbyname('字段').asstring;
temp_adoquery.next;
end;
end;
finally
end;
end;
MichealLee() 所讲的是一样的。
with datamodule2.bumentable do
begin
active:=true;
max:=datamodule2.bumentable.recordcount;
for i:=0 to max-1 do
begin
bumenname1:=datamodule2.bumentable.fieldbyname('bumenname').asstring;
combobox1.items.add(bumenname1);
datamodule2.bumentable.next;
end;
active:=false;
begin
open;
first;
while not eof then
begin
ComboBox1.Items.Add(FieldByName('name').AsString);
Next;
end;
end;