I have an accordion where I load a TreeView inside a ScrollPane using BXML:

<Accordion bxml:id="leftMenu" styles="{padding:0}">
<ScrollPane Accordion.headerData="Sider" horizontalScrollBarPolicy="fill_to_capacity" verticalScrollBarPolicy="fill_to_capacity">
            <page:PageTreeView/>
        </ScrollPane>
</Accordion>

This works great. Then I try to do the same programatically:

ScrollPane scrollPane = new ScrollPane(ScrollPane.ScrollBarPolicy.FILL_TO_CAPACITY, ScrollPane.ScrollBarPolicy.FILL_TO_CAPACITY);
Accordion.setHeaderData(scrollPane, "Sider");
scrollPane.add(new PageTreeView());
leftMenu.getPanels().add(scrollPane);

I see the header, but my TreeView is not visible. If I add the TreeView directly to the leftMenu.getPanels().add() method, it shows up, but obviously without a ScrollPane :)

Please advice :)

-- Edvin

Reply via email to