输入一字符显示出一字符串是怎样实现的(50分)

  • 主题发起人 主题发起人 cly888
  • 开始时间 开始时间
C

cly888

Unregistered / Unconfirmed
GUEST, unregistred user!
输入一字符显示出一字符串是怎样实现的必须在dbcombobox中实现
 
在 DBCOMBOBOX 的 ONCHANGE 中
过虑掉不符合条件的记录。
 
可否说得说的详细一点
 
这个没有做过,我设想是不是这样实现:
  取得你输入的字串,也就是copy(dbcombobox1.text,1,dbcombobox1.selstart);
再判断是否有符合的字串,加上去。想想可不可以用pos来判断。。。ok
procedure TForm1.Button1Click(Sender: TObject);
begin
combobox1.SetFocus;
combobox1.SelStart:=3;//以上两句用来测试用的
edit1.Text:=copy(combobox1.text,1,combobox1.SelStart);//得到你想输入字串的头部
end;

只是想,没有试过,你试到行,通知一下,呵呵。。。
 
The combo box displays the current value of this field, and allows the user to set the value of this field on the current record.
The dataset the field is located in is specified by the DataSource property.
DBComboBox1.DataField := 'CountryName';

Tip:For a data-aware combo box component for which the list values are automatically supplied, use a TDBLookupComboBox instead.
 
多人接受答案了。
 
后退
顶部