如何使用CTRL+DELETE快捷键删除行!
解决方案 »
- string 如何转换为 byte ?
- 一个无法关闭的程序。
- 在delphi程序里怎么设置sql server客户端默认的网络协议?
- 如何让“托盘”在状态栏闪烁,就像qq在接受到信息的时候一样?
- 怎么对ID, ParentID字段类用SQL语句进行排序?
- 关于listview的问题???
- 怎样学习Delphi
- 一个100分的打印问题!!
- 谁有Dev Express For d6的控件????
- 请教Kingron
- 基本问题 如何将sqlserver的写操作 用在oracle中 (commit,rollback 怎么写)?
- 在treeview中,为什么我点击第二,三,四层的节点的图标时都会变成根节点的图标?
type
TStringGridEx = class(TStringGrid);procedure TForm1.StringGrid1KeyDown(Sender: TObject; var Key: Word;
Shift: TShiftState);
begin
case Key of
VK_DELETE: if ssCtrl in Shift then
with TStringGridEx(Sender) do
DeleteRow(Row);
end;
end;
TStringGridEx = class(TStringGrid);procedure TForm1.StringGrid1KeyDown(Sender: TObject; var Key: Word;
Shift: TShiftState);
begin
if (Sender Is TStringGridEx) and (Key = VK_DELETE) and (ssCtrl in Shift) then
with TStringGridEx(Sender) do
DeleteRow(Row);
end; case Key of
VK_DELETE: if ssCtrl in Shift then
with TStringGridEx(Sender) do
DeleteRow(Row);
end;
end;