dev 按指定按键弹出下拉控件
if (AItem = cxGrid1DBTableView1cgsl) and (key in [106, 107, 109, 111]) then begin if AEdit <> nil then if AEdit.ClassType = TcxCalcEdit then //如果是计算器 if not TcxCalcEdit(AEdit).DroppedDown then //没有弹起状态 begin TcxCalcEditProperties(cxGrid1DBTableView1cgsl.Properties).ImmediateDropDownWhenKeyPressed := True; cxGrid1DBTableView1.Controller.EditingController.ShowEdit(AItem, '+'); //要设置两个,不然不会生效 TcxCalcEditProperties(cxGrid1DBTableView1cgsl.Properties).ImmediateDropDownWhenKeyPressed := False; TcxCalcEditProperties(AEdit.ActiveProperties).ImmediateDropDownWhenKeyPressed := False; end; end;
这里绑定的是TcxCalcEdit

浙公网安备 33010602011771号