🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: pl.comp.lang.delphi
Article #34

Re: Problem z DBGrid

#34
From: Dariusz Michalek
Date: Thu, 11 Sep 1997 00:00
20 lines
829 bytes
Bolek Umnicki wrote:
> 
> Komponent DBGrid ma mozliwosc kasowania rekordow przez Ctrl+Del. Jak
> to mozna wyeliminowac?

Wystarczy przejac zdarzenie OnKeyDown DBGrida i odfiltrowac klawisz
VK_DELETE jesli wcisniety jest Ctrl.
np:

procedure TForm1.DBGrid1KeyDown(Sender: TObject; var Key: Word;
  Shift: TShiftState);
begin
  if (Key = VK_DELETE) and (ssCtrl in Shift) then
    Key := 0;
end;

Pozdrawiam
Darek
D.Mic...@bsb.com.pl
Technical Details
Message-ID: <3417AFA5.2FA539C9@bsb.com.pl>
Path: mbox-mo1.pugleaf.net!unknown!not-for-mail
References: <341794da.0@news.tpnet.pl>

Show Full Headers
Complete Article Headers
From: Dariusz Michalek <D.Mic...@bsb.com.pl>
Subject: Re: Problem z DBGrid
Date: 1997/09/11
Message-ID: <3417AFA5.2FA539C9@bsb.com.pl>
X-Deja-AN: 271537351
References: <341794da.0@news.tpnet.pl>
Organization: Public NewsServer at NASK N.O.C.
Newsgroups: pl.comp.lang.delphi
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit