You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@pivot.apache.org by Edvin Syse <ed...@sysedata.no> on 2011/06/09 23:54:10 UTC

Adding components to Accordion programatically - blank

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

Re: Adding components to Accordion programatically - blank

Posted by Greg Brown <gk...@verizon.net>.
> And after peeking at the DefaultProperty annotation in ScrollPane, I now feel a bit stupid, but atleast my app is working :)

:-)


Re: Adding components to Accordion programatically - blank

Posted by Edvin Syse <ed...@sysedata.no>.
Den 09.06.2011 23:54, skrev Edvin Syse:
> 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);

And after peeking at the DefaultProperty annotation in ScrollPane, I now 
feel a bit stupid, but atleast my app is working :)

scrollPane.setView(new PageTreeView());

-- Edvin