The trace is supposed to return that.

What you want can be done in several ways.

1. When you create the panel and assign it to a variable, you can use the variable for comparison like if (e.relatedObject == panel1)

2. You can assign a unique name to your panels after you create them like panel1.name = "MyFirstPanel";

3. You can use a Dictionary object to store information about the panel.