Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Native Development Knowledge Base

Dynamically add a tab into an existing TabbedPane

by Developer on ‎12-06-2013 11:56 AM (1,369 Views)


Dynamically add a tab into an existing TabbedPane.


TabbedPane {
    id: tabbedPane
    attachedObjects: [
        ComponentDefinition {
            id: pageDefinition
            source: "asset:///UI.qml"
    function newTab() {
        var c = "import bb.cascades 1.0; Tab{}";
        var tab = Qt.createQmlObject(c,tabbedPane,"newTab");
        tab.content = pageDefinition.createObject(tab);
Users Online
Currently online: 61 members 7,470 guests
Please welcome our newest community members: