Class TValidStringGrid (unit Vgrid)

Inherits from

TStringGrid

Constructors


constructor Create(AOwner: TComponent);



Functions

function DeleteRow(p_Row:integer):boolean ;

Call this func to avoid OnInvalidate in beginning

if not Validate then recovery old-text


procedure InitValidate;

p_Row no change

function InsertRow(var p_Row:integer; p_GrowFlag:boolean):boolean ;

return=new row

procedure Click;

myself constructor

procedure KeyPress(var Key: Char);

if not Validate then recovery old-text

procedure CMEnter(var Message: TCMEnter);

if not Validate then recovery old-text

procedure CMExit(var Message: TCMExit);


Properties

Events

event OnValidate : TValidateEvent

Published declarations

Variables

EnterFlag : boolean ;


FOnValidate : TValidateEvent ;


ModifyFlag : boolean ;

Private declarations

OldCellText : String ;


OldCol : LongInt ;


OldRow : LongInt ;


ValidateFlag : boolean ;


ValidateText : String ;



Constructors


constructor Create(AOwner: TComponent);


Functions


function DeleteRow(p_Row:integer):boolean ;

Call this func to avoid OnInvalidate in beginning

if not Validate then recovery old-text


procedure InitValidate;

p_Row no change


function InsertRow(var p_Row:integer; p_GrowFlag:boolean):boolean ;

return=new row


procedure Click;

myself constructor


procedure KeyPress(var Key: Char);

if not Validate then recovery old-text


procedure CMEnter(var Message: TCMEnter);

if not Validate then recovery old-text


procedure CMExit(var Message: TCMExit);


Properties


Events


event OnValidate : TValidateEvent

Published declarations


Variables


EnterFlag : boolean ;


FOnValidate : TValidateEvent ;


ModifyFlag : boolean ;

Private declarations


OldCellText : String ;


OldCol : LongInt ;


OldRow : LongInt ;


ValidateFlag : boolean ;


ValidateText : String ;