Jump to content

add ClientEvent after a component is rendered


Recommended Posts

I am guessing whether is it possible to add a ClientEvent AFTER the component construction and render. For instance: add (or remove) a mouseover effect to a panel after the user clicks on a button.

void __fastcall TForm1::ButtonClick(TObject* Sender)
Link to comment
Share on other sites



If I call JSAddListener multiple times, do the events cancel out?


Yes, it can be done...



How can I remove all the mouseover events added that way?


For example (JS code):

MainForm.UniPanel1.events.mouseover.listeners = [];


uses ... uniGUIJSInterface;
procedure TMainForm.UniButton1Click(Sender: TObject);
  IUniJSInterface(UniPanel1).JSAssign('events.mouseover.listeners', '[]');

Best regards.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Create New...