How to Call mousePressed event?

Hi,

I have two components (one Table, One Rectangle) in my window. I have written some script to run on ‘mousePressed’ event of the Rectangle.

Now, in my Table ‘mouseClicked’ event I want to call ‘mousePressed’ event of the rectangle. Is it possible to call the an event from another component event.

Regards
Sasi K

Technically yes, you could, but it’s ugly.

Instead, I’d move that script to a global module script, and have both events call that global function.

Thank you Carl. Can I know how to do it technically ? (I am just curious)

Sure, it was covered in this post. Look at the line that dispatches a new mouse event to the chart.

Thank you Carl.