Delphi Pages Forums  

Go Back   Delphi Pages Forums > Delphi Forum > General

Lost Password?

Reply
 
Thread Tools Display Modes
  #1  
Old 03-04-2013, 07:10 PM
Pedro.Fornet Pedro.Fornet is offline
Member
 
Join Date: Jun 2005
Posts: 38
Default OnColEnter in TStringgrid

Hi,

How to create onColEnter and onColExit in TStringgrid.

Tks a lot.

Pedro
Reply With Quote
  #2  
Old 03-13-2013, 01:48 AM
Pedro.Fornet Pedro.Fornet is offline
Member
 
Join Date: Jun 2005
Posts: 38
Default OnColEnter Event

I try this source, but don't work :

unit CstringGrid1;

interface

uses
SysUtils, Classes, Controls, Grids;

type
TCstringGrid1 = class(TStringGrid)
private
{ Private declarations }

FOnColEnter: TNotifyEvent;
FOnColExit: TNotifyEvent;
protected
{ Protected declarations }

procedure ColEnter; dynamic;
procedure ColExit; dynamic;
public
{ Public declarations }
published
{ Published declarations }

property OnColEnter: TNotifyEvent read FOnColEnter write FOnColEnter;
property OnColExit: TNotifyEvent read FOnColExit write FOnColExit;
end;

procedure Register;

implementation

procedure Register;
begin
RegisterComponents('Samples', [TCstringGrid1]);
end;

procedure TCstringGrid1.ColEnter;
begin
if Assigned(FOnColEnter) then FOnColEnter(Self);
end;

procedure TCstringGrid1.ColExit;
begin
if Assigned(FOnColExit) then FOnColExit(Self);
end;

end.
Reply With Quote
Reply

Tags
oncolenter, stringgrid

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On

Forum Jump


All times are GMT. The time now is 08:09 AM.


Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2019, vBulletin Solutions, Inc.