在Combobox1的OnKeyDown事件中加入以下代码
procedure TForm1.ComboBox1KeyDown(Sender: TObject; var Key: Word;
Shift: TShiftState);
begin
if ((Key=38) or (Key=40)) then Combobox1.DroppedDown:=true;
end;
procedure TForm1.ComboBox1KeyDown(Sender: TObject; var Key: Word;
Shift: TShiftState);
begin
if ((Key=38) or (Key=40)) then Combobox1.DroppedDown:=true;
end;
解决方案 »
- treeview拖拽节点时有残留痕迹,怎么解决
- 我与Delphi
- 在delphi中如何利用tidtcpserver和tidtcpclient控件,已内存流的方式传输长字符串呀?急!!!
- 求一个好用的收藏夹控件。
- 吐血求用程序获得子网掩码的方法!!!给与帮助者必定中谢。
- 急!我用DELPHI+ACCESS编了一个数据库程序,数据库里有两三万记录,每次查询速度很慢,请大家帮我解决一下,谢!非常着急
- 登录窗口问题??
- 回车键代替tab键的问题?
- 100 分求中文朗读组件,分不够可以再加。
- 这样的问题是不是难啊,我开了四五帖了都没能解决??(再来一帖)
- 有几种方法用Delphi连接Oracle
- 读取 ini 文件:可以读出其中一个键值,可是另外的就是读不出!!
Shift: TShiftState);
begin
if key=vk_down then
combobox1.DroppedDown:=true;
end;
一般情况下都是在keydown事件下
if key=13 then showmessage('enter');
Shift: TShiftState);
begin
if key=40 then (Sender as TComboBox).DroppedDown:=true;
end;