CGDevTools Forum

Welcome to the Official CGDevTools Support Community Forums.

Assign OnTapHold programatically

by cyracks » 06 Jan 2019 12:21

Hello,

I would like to create TIWCGJQMLabel programatically and assign event OnTapHold.
Code: Select all
procedure TForm_mTravelOrderRoute.pListFiles;
var MLabelFile: TIWCGJQMLabel;
begin
    MLabelFile := TIWCGJQMLabel.Create(Self);
    MLabelFile.Events.OnTapHold := MLabelFileEventsTapHold; // ERROR HERE
end;

Code: Select all
procedure TForm_mTravelOrderRoute.MLabelFileEventsTapHold(Sender: TObject; AParams: TStringList);
begin
    WebApplication.ShowMessage(AParams.Values['ComponentName']);
end;


But when code is compiled error "E2035 Not enough actual parameters" is raised.

I know this is probably not just cgdevtools question but still I used similar code many times in VCL and it worked (as long as procedure had right parameters).

Best regards,
Tomaž
cyracks
 
Posts: 92
Joined: 09 Feb 2016 12:47

by Alexander Bulei » 09 Jan 2019 11:51

Hi cyracks,

MLabelFile.Events.OnTapHold := MLabelFileEventsTapHold; // ERROR HERE


Of course you will get the error there...just follow the tree structure of event:

Code: Select all
IWCGJQMLabel1.Events.OnTapHold.OnEvent


Best Regards.
Group: Developers | Support Team

  • info [at] cgdevtools.com - General information
  • sales [at] cgdevtools.com - Sales department
  • support [at] cgdevtools.com - Product and Technical Support
User avatar
Alexander Bulei
Site Admin
 
Posts: 3635
Joined: 15 May 2012 08:52
Location: Mealhada, Portugal

by cyracks » 09 Jan 2019 11:52

:) of course, thank you.
cyracks
 
Posts: 92
Joined: 09 Feb 2016 12:47


Return to JQMLabel

Who is online

Users browsing this forum: No registered users and 1 guest

Contact Us.