DBLookupComboboxEh修改支持退格弹下拉框

DBLookupEh.pas 中修改代码:

procedure TCustomDBLookupComboboxEh.KeyPress(var Key: Char);

begin

if FListVisible and CharInSetEh(Key, #13, #27) then

begin

CloseUp(Key = #13);

Key := #0;

end;

inherited KeyPress(Key);

case Key of

#8:

if (Style = csDropDownListEh) then

begin

ProcessSearchStr(Key);

Key := #0;

end

else

begin

//加入代码

if DropDownBox.AutoDrop and not FListVisible and FListActive then DropDown;

if (Style = csDropDownListEh) then

begin

ProcessSearchStr(GetCompleteKeyPress);

Key := #0;

end;

end;

{#13:

begin

Key := #0;

FDataLink.UpdateRecord;

SelectAll;

end;}

#32..High(Char):

begin

if DropDownBox.AutoDrop and not FListVisible and FListActive then DropDown;

if (Style = csDropDownListEh) then

begin

ProcessSearchStr(GetCompleteKeyPress);

Key := #0;

end;

end;

end;

end;

相关推荐
_lorzl_1 个月前
Delphi 10.4.2 IDE Attach to process... 到宿主进程时死锁的原因与修复
ide·delphi
昆曲之源_娄江河畔2 个月前
DBGridEh Footer的使用
前端·数据库·delphi·dbgrideh
pcplayer3 个月前
非常好用的 Excel 读写控件
excel·delphi·office
月巴月巴白勺合鸟月半3 个月前
从 Delphi 到 FMX:Borland/Embarcadero 跨平台开发三十年兴衰史
跨平台·delphi
START_GAME3 个月前
Delphi 10.3安装与辅助工具uniGUI 配置指南
delphi·delphi10.3
专注VB编程开发20年3 个月前
delphi死嗑Pascal冷门编程语言,Borland不认可 “通用多语言 IDE”,认为 “专有语言才是护城河”
开发语言·ide·delphi
专注VB编程开发20年3 个月前
Delphi 的VCL控件库无法公开给其他编程语言调用
开发语言·delphi
qqww1554 个月前
DelphiSpeedUp 介绍
delphi
xyzhan4 个月前
使用Delphi开发混凝土生产车间自动化过程控制系统的仿真系统
运维·物联网·自动化·delphi·仿真·混凝土车间