View Single Post
07/11/16, 01:14 PM   #9
tgolsson
Join Date: Jul 2016
Posts: 5
Originally Posted by Haho View Post
lol no, toplevelcontrol is the one attached to the Guiroot directly. Think of it like your own paper sheet to decorate. Then inside, make your controls groups like you intended to at first.

So yes you have to have one (or you don't if your controls are children of an existing control, but i doubt it in your case) But one is enough

for the xml question, i dont get it... are you making one xml file/control?
you can write everything in the same xml file.

the virtual one will be separated from the "nesting"... i'm not a fan of xml anyway, as i said look into any addon with a UI and a xml and you should see how it works. Or someone else would be more precise on this.

so basically : toplevel will be defined, and you'll have after that your virtual definition for the controls you'll be creating dynamically. And they'll have toplevel as parent instead of Guiroot.
Sorry, I was perhaps a bit too brief.

I was wondering whether I could do
Code:
<GuiXml>
    <Controls>
        <Control name="MyAddonUnitFrame" virtual="true">
             <Controls>
                 <Label name="$(parent)Name" text="bob" />
             </Controls>
        </Control>
    </Controls>
</GuiXml>
<!-- another file -->
<GuiXml>
    <Controls>
        <TopLevelControl>
            <Controls>
                <MyAddonUnitFrame name="AddonGroup1" />
                <MyAddonUnitFrame name="AddonGroup2" />
                <MyAddonUnitFrame name="AddonGroup3" />
            </Controls>
        </TopLevelControl>
    </Controls>
</GuiXml>
Or something similar to this.

Last edited by tgolsson : 07/11/16 at 01:17 PM.
  Reply With Quote