Tabs are not appearing side by side in formLayout

Hi all, I am trying to create a custom UI in which there will be tabs side by side where it will display the Outliner, hypershade etc.
I am trying to create the UI from scratch…

Currently I am running into a problem in which my second tab instead of appearing right beside the Outliner tab (when the tab is to selected), it is appearing below the outliner.
Furthermore, I noticed that I have 2 Outliners (One hidden unless I draw it up)

I have attached pictures for references.
Would appreciate for any advices given.

win = cmds.window(w=400, h=600)
tab = cmds.tabLayout()

panelLayout = cmds.formLayout("Outliner")
panel = cmds.outlinerPanel()
cmds.formLayout(panelLayout, e=True, 
                attachForm=[
                    (panel, "top", 0),
                    (panel, "left", 0), 
                    (panel, "bottom", 0), 
                    (panel, "right", 0)
                ])
                
panelLayout1 = cmds.formLayout("Hypershade")
panel1 = cmds.hyperPanel()
cmds.formLayout(panelLayout1, e=True, 
                attachForm=[
                    (panel1, "top", 0),
                    (panel1, "left", 0), 
                    (panel1, "bottom", 0), 
                    (panel1, "right", 0)
                ])
cmds.showWindow(win)



In your 2nd form layout, set the parent flat to tab.

panelLayout1 = cmds.formLayout("HyperShade", p=tab)

The multiple outliners is not a bug, its a feature been in maya for a long time now

[QUOTE=passerby;25024]In your 2nd form layout, set the parent flat to tab.

panelLayout1 = cmds.formLayout("HyperShade", p=tab)

The multiple outliners is not a bug, its a feature been in maya for a long time now[/QUOTE]

Hi passerby, thanks for letting me know. Any ideas if I can disable the multiple outliners? Just asking :slight_smile:

I keep getting this error # Error: file: /apps/Linux64/aw/maya2014/scripts/others/HyperGraphEdMenu.mel line 2017: Object ‘frameGraphButton’ not found. #
Would this means that I have to import in the actual window of the hypergraph, hierarchy since I cannot simply tear it out to display the nodes/ objects?

Also, may I also ask if it is possible to attach another script, using the current format of a custom script?
I am asking this bescause, when I tried inserting panel2 = mm.eval(‘source “renamer.mel”;rename;’), no tabs are shown besides it and the whole window was replaced with the renaming ui…