Thanks... It's Work
OK
Michael Van Canneyt <[EMAIL PROTECTED]> wrote:
On Fri, 15 Jun 2007, Darmawan Sugiarto wrote:
>
> Hello Guy...
> How can I make custom control for a component for example:
>
> procedure Tform1.OnButton1Click(Object:Sender)
> var
> _i:integer;
> _b:Tbutton;
> begin
> _b:=Tbutton.Create(form1);
> _b.parent:=Panel1;
> _b.OnClick:=???
> end
>
>
> How can I assign a dynamic event for my new button...
> Today I try like Delphi...
> _b.OnClick:=FormBtnClick
in objfpc mode (the default for lazarus) you must add the @ operator:
_b.OnClick:[EMAIL PROTECTED];
If you use delphi mode, you really can do
_b.OnClick:=FormBtnClick;
This is a FAQ.
Michael.
_________________________________________________________________
To unsubscribe: mail [EMAIL PROTECTED] with
"unsubscribe" as the Subject
archives at http://www.lazarus.freepascal.org/mailarchives
=============INTOSOFT============
ALEXIO CHAOS
[EMAIL PROTECTED]
Yahoo Messager
=================================
---------------------------------
Building a website is a piece of cake.
Yahoo! Small Business gives you all the tools to get online.