关于第三方控件问题(100分)

  • 主题发起人 主题发起人 delphihsc
  • 开始时间 开始时间
D

delphihsc

Unregistered / Unconfirmed
GUEST, unregistred user!
为什么所有的第三方控件的表格或编辑框(如:dxgrid,rxgrid,ehlib...)
都不支持回车键.指录入时单元格激活另一窗口 ,还有LOOKUPCOMBOX...也不行
谁有支持回车键的控件呢?如果在GRID上自己写太麻烦了.谢谢!!!!!!!!
 
我没有见到,不过自几写写程序也不难嘛!
 
to zhoulide
你有没现成的帖个代码出来?
 
INFOPOWER的wwdBGrid支持.
 
我做了一段过程你可以试一试

procedure Tftyhsgc.ENTERTOTAB(SenderCS: TObject; DQCK: TFORM; var KEYCS: WORD; ShiftCS: TShiftState);
//模拟回车为TAB键
//DQCK 当前窗口 KEYCS 虚拟键值

var
XNKEY: WORD;
begin
XNKEY := KEYCS;
if (KEYCS = vk_return) then
if not (DQCK.ActiveControl is TDbgrid) and not (DQCK.ActiveControl is TwwDbgrid) then
DQCK.perform(cm_dialogkey, vk_DOWN, 0)
else
if (DQCK.ActiveControl is TDbgrid) and not (DQCK.ActiveControl is TwwDbgrid) then {是在 TDbgrid 控件内}
begin
with TDbgrid(DQCK.ActiveControl) do
if Selectedindex < (FieldCount - 1) then
Selectedindex := Selectedindex + 1 { 移动到下一字段}
else
Selectedindex := 0;
end;

if (keyCS = vk_down) then
if not (DQCK.ActiveControl is TDbgrid)
and not (DQCK.ActiveControl is TwwDbgrid)
and not (DQCK.ActiveControl is Twwpopupgrid)
and not (DQCK.ActiveControl is TwwDblookupcombo)
and not (DQCK.ActiveControl is TwwDbcombobox)
then
DQCK.perform(cm_dialogkey, vk_DOWN, 0);

if keyCS = vk_up then
if not (DQCK.ActiveControl is TDbgrid)
and not (DQCK.ActiveControl is TwwDbgrid)
and not (DQCK.ActiveControl is Twwpopupgrid)
and not (DQCK.ActiveControl is TwwDblookupcombo)
and not (DQCK.ActiveControl is TwwDbcombobox)
then
DQCK.perform(cm_dialogkey, vk_UP, 0);
end;
 

Similar threads

D
回复
0
查看
2K
DelphiTeacher的专栏
D
D
回复
0
查看
1K
DelphiTeacher的专栏
D
D
回复
0
查看
1K
DelphiTeacher的专栏
D
S
回复
0
查看
3K
SUNSTONE的Delphi笔记
S
S
回复
0
查看
2K
SUNSTONE的Delphi笔记
S
后退
顶部