Topic: Using BUtton(Sender) in a script

Hello Dimitri

In this new version of MVD,Is it possible to use in a script this instruction :
(here is an exemple in pseudo code)

Procedure Button1.Click(.........)
Begin
       Refresh_Button(Sender......).;
End;

This to automatically refresh a database.(or why not by using a timer)

Thanks

Jean B.

Re: Using BUtton(Sender) in a script

Hello,


One event may belong to two or more buttons, Sender lets you know who sent the event.

procedure Form1_Button_OnClick (Sender: string; var Cancel: boolean);
begin
     ShowMessage(Sender);
end;
Dmitry.

Re: Using BUtton(Sender) in a script

Thanks for your answer

ShowMessage(Sender);

There is not any parameter to give, (Sender) is enough ?

Best regards

Jean B.

Re: Using BUtton(Sender) in a script

Sorry, may be I do not understand your question )


Sender is name of component who sent the event.

procedure Form1_Button_OnClick (Sender: string; var Cancel: boolean);
begin
     if Sender = 'Button1'  then ShowMessage('Event from Button1');
     if Sender = 'Button2'  then ShowMessage('Event from Button2');
end;
Dmitry.

Re: Using BUtton(Sender) in a script

Well
It's totally clear now for me
Thanks