On Thu, 20 Dec 2007, John vd Waeter wrote:

> Hi all,
> 
> I have several TUpDown buttons created at runtime.
> 
> I have a general event for the onclick:
> 
> procedure UpDownClick(Sender:TObject; Button:TUDBtnType)
> begin
>  ...
>  DoMyStuff;
>  ...
> end;
> 
> Now at runtime I like to connect the updown.Onclick to this procedure:
> 
> With MyUpdown do
>  begin
>   Parent:= ...
>   Top   := ...
>   Left  := ...
>   OnClick := UpDownClick;

Try changing this to

  OnClick := @UpDownClick;

or replace the mode directive at the top of the unit with delphi mode:
{$mode delphi}

Michael.

_________________________________________________________________
     To unsubscribe: mail [EMAIL PROTECTED] with
                "unsubscribe" as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives

Reply via email to