*Dear List * :)
I created my own custom TStringList VCL and now I want to add a better
editor to it. I want to let the user to enter the text in a TEdit
control, positioned right above the cell.
For this, I want to create at run time a TEdit control. All is nice and
beautiful until I want to assign an event to TEdit.OnChange. It does not
assign:
TYPE
TBGrid= class(TStringgrid)
Private
...
protected
Editor: TEdit; { Custom InPlace Editor in StringGrid }
End;
constructor TBGrid.Create;
begin
inherited Create(AOwner);
Editor:= TEdit.Create(Self);
Editor.Parent := Self;
Editor.OnChange := Edit2Change; <- this is working
Editor.OnClick := Edit2Change; <- doesn't assign
bla bla bla
End;
procedure TBGrid.Edit2Change(Sender: TObject);
begin
Bip(5000, 200);
end;
I put the StringGrid on a form, I run the program. The Editor shows.
If I click on it, it beeps. If I type a char in it, it does not beep.
__________________________________________________
Delphi-Talk mailing list -> [email protected]
http://www.elists.org/mailman/listinfo/delphi-talk