Skip to main content
V.H
Senior
November 19, 2021
Solved

How to distinguish which custom container was clicked?

  • November 19, 2021
  • 1 reply
  • 696 views

Hello,

I have a custom container with clicklistener, and I add two of this in my screen.

How to distinguish which custom container was clicked?

void CustomContainer::boxClickHandler(const touchgfx::Box& b, const ClickEvent& evt)

{

if (ClickEvent::PRESSED == evt.getType())

{

// How to distinguish which custom container was clicked?

...

}

else{}

}

This topic has been closed for replies.
Best answer by V.H

I solved the problem by using 'this' parameter.

1 reply

V.H
V.HAuthorBest answer
Senior
November 19, 2021

I solved the problem by using 'this' parameter.