with datamodule.q_cam_ry do
begin
close;
sql.clear;
sql.add('select * from cam_ry';
sql.add('order by gh');
prepare;
open;
first;
for i:=1 to recordcount do
begin
combobox1.items.add(trim(fieldbyname('name').asstring));
next;
end;
end;
--------------------------------
我在2000下,用combobox1下拉可以选择人员,也可以在combobox1的框中输入姓名。
可我在98下,用combobox1下拉可以选择人员,当我在combobox1的框中输入姓名时就是出现乱码。不知是哪里的问题,我试了好几种五笔或拼音都是如此,请朋友看看问题出在哪里?谢谢。
begin
close;
sql.clear;
sql.add('select * from cam_ry';
sql.add('order by gh');
prepare;
open;
first;
for i:=1 to recordcount do
begin
combobox1.items.add(trim(fieldbyname('name').asstring));
next;
end;
end;
--------------------------------
我在2000下,用combobox1下拉可以选择人员,也可以在combobox1的框中输入姓名。
可我在98下,用combobox1下拉可以选择人员,当我在combobox1的框中输入姓名时就是出现乱码。不知是哪里的问题,我试了好几种五笔或拼音都是如此,请朋友看看问题出在哪里?谢谢。
ComboBox1.Font.Name:='宋体';
ComboBox1.Font.Size:=10;另外:
for i:=1 to recordcount do
最好改为
While Not Eof do
ComboBox1.Font.CharSet:=GB2312_CHARSET;
ComboBox1.Font.Name:='宋体';
ComboBox1.Font.Size:=10;
还是不行耶
你把这个属性的值设置为False,再试试
---------
ok了,谢谢,明天给分
我也是一样的!
我的解决办法是多加了一个Edit控件,比ComboBox宽度小一点,其它的不用多说了!