Forum > General

custom components?

(1/1)

erkka:
I'm using TStringGrid to display my data, and it works just fine.
The question is, if I wanted to add some new methods to TStringGrid, is there any light-weight way to do it?

If I just use


 type
   TOwnStringGrid (TStringGrid)
      procedure Update(Sender: TObject);
   end;


but then I can't just drag, drop and edit TOwnStringGrid with form designer ?

Making a new component package with a new component sounds a bit like overkill, as I just wanted to add one or two methods to be used only in this one project...

Any ideas to help a noob like me?

theo:
Afaik no. Either you access it in code or you install it like
http://wiki.lazarus.freepascal.org/How_To_Write_Lazarus_Component

Btw. your syntax is wrong.
Should be:
TOwnStringGrid = class(TStringGrid)

Navigation

[0] Message Index

Go to full version