PyROOT GUI: import a TGCompositeFrame from separate file

Dear Rooters,

I would like to create a PyROOT GUI ( with a TGTab element into which I want to import a TGCompositeFrame from a separate file ( However, when I do AddFrame, the imported Frame is located in a separate window instead of being placed in the tab.

Do you have any suggestions how to fix this?

Bojan (2.6 KB)

Add fF2.mainW.ReparentWindow(fTab_T2):

    fTab_T2 = self.Tab.AddTab("tab 2")
    fF2 = importedFrame.myframe()
    fTab_T2.AddFrame(fF2.mainW, fL)

The child frame must have the correct pointer to its parent…

That solves it. Thank you for a fast reply.

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.