buggins / dlangui

Cross Platform GUI for D programming language
Boost Software License 1.0
816 stars 121 forks source link

How do I add tabs to TabWidget in DML? #569

Open spikespaz opened 6 years ago

spikespaz commented 6 years ago

I can't figure out how to define tabs as children of TabWidget in DML. I would think it would be something like this, but it's not.


TabWidget {
    TabItem {
        text: "General"
        id: "TAB_GENERAL"

        ChildWidgets ...
    }
    TabItem {
        text: "Settings"
        id: "TAB_SETTINGS"

        ChildWidgets ...
    }
}
triplejam commented 6 years ago

I don't think that tabs or docks at the moment can be completely done in DML, not sure. But you can define separate widgets with DML which then can be used in the tabs. Also you could make a widget with DML which contains a VerticalLayout which can hold your TabWidget.