Two Overlapped TPads

Dear Root experts,

I implement two TPads p1 and p2 in the same canvas. p1 is the bottom TPad and p2 is the top one, which is smaller. I draw histogram in p1 and draw two regions in p2.

I have two questions:

  1. How can I always set the p2 as the top TPad? Since if you click p1, p1 will pop up as the top TPad and cover p2. But I always want p2 on the top.

  2. If you drag p2 using left mouse, p2 will move with the mouse. How can I stop the movement of p2? I hope p2 can always stay still at the original position. I try to use SetEditable(kFALSE). Although it can stop the movement of p2, it also stop me dragging and moving two regions. In fact, I want to move the two regions.

Thank you so much for your advice!

Best regards,

Overlap_3.C (1.36 KB)

This was a bug on windows. It is fixed now in the trunk. Thanks for reporting. To pop up a pad the middle button should be used not the double click.


Hi Couet,

Thank you very much for your reply! It works perfectly now.

Happy Holidays :slight_smile:

Good ! Best wishes :slight_smile: