I'm creating a small applet to replace the imageviewer/fileviewer in
TinyMCE, and I've run into a problem where I can't get a ScrollPane to
show scrollbars. I looks like the content just keeps growing.
My component extends TablePane. Inside it is a SplitPane, and in
left/right is a Border with a ScrollPane. The contents in each
ScrollPane needs scrollbars, but none appear. I realise this is probably
a complete newbie mistake, but I just can't see it :) Here is my
complete markup:
<filebrowser:VortexFileBrowser xmlns:bxml="http://pivot.apache.org/bxml"
xmlns="org.apache.pivot.wtk" xmlns:filebrowser="vortex.filebrowser">
<columns>
<TablePane.Column width="1*"/>
</columns>
<TablePane.Row height="1*">
<SplitPane orientation="horizontal" splitRatio="0.25">
<left>
<Border>
<ScrollPane horizontalScrollBarPolicy="fill"
verticalScrollBarPolicy="fill">
<TreeView bxml:id="folderTree"/>
</ScrollPane>
</Border>
</left>
<right>
<Border>
<ScrollPane horizontalScrollBarPolicy="fill"
verticalScrollBarPolicy="fill">
<TableView bxml:id="fileList" styles="{ font:
'Arial 20' }">
<columns>
<TableView.Column bxml:id="iconColumn"
name="icon" headerData="Ikon" width="64"/>
<TableView.Column name="name"
headerData="Filnavn" width="1*"/>
<TableView.Column name="size"
headerData="Size" width="100"/>
</columns>
</TableView>
<columnHeader>
<TableViewHeader tableView="$fileList"
styles="{ font: 'Arial BOLD 20' }"/>
</columnHeader>
</ScrollPane>
</Border>
</right>
</SplitPane>
</TablePane.Row>
</filebrowser:VortexFileBrowser>
I use the following code to show it from Application#startup()
Window window = new Window();
window.setMaximized(true);
BXMLSerializer serializer = new BXMLSerializer();
VortexFileBrowser browser = (VortexFileBrowser)
serializer.readObject(getClass().getResource("VortexFileBrowser.bxml"));
window.setContent(browser);
window.open(display);
What am I missing? :)
-- Edvin