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

How to distinguish which custom container was clicked?

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.
V.H
V.HBest answer
Senior
November 19, 2021

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.