Skip to Main Content

Java SE (Java Platform, Standard Edition)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

TitledPane in a VBox ... TitledPane ignores maxSize

909362Jan 25 2012 — edited Jan 30 2012
Hi,

I want to use a VBox instead of an Accordion, so i can have more TitledPanes expanded than one.
<?xml version="1.0" encoding="UTF-8"?>

<?import javafx.scene.layout.*?>
<?import javafx.scene.control.*?>

<VBox xmlns:fx="http://javafx.com/fxml">
	<children>
		<TitledPane VBox.vgrow="ALWAYS">
			<text>Navigation</text>
			<content>
				<TreeView showRoot="false" >
					<root>
						<TreeItem value="Documents">
							<children>
								<TreeItem value="Item1" />
							</children>
						</TreeItem>
					</root>
				</TreeView>
			</content>
		</TitledPane>
		<TitledPane  VBox.vgrow="ALWAYS">
			<text>Navigation</text>
			<content>
				<TabPane tabClosingPolicy="UNAVAILABLE">
					<tabs>
						<Tab> 
							<content>
								<ListView/> 
							</content>
							<text>tab1</text>
						</Tab>
						<Tab> 
							<content>
								<ListView/> 
							</content>
							<text>tab2</text>
						</Tab>
					</tabs>
				</TabPane>
			</content>
		</TitledPane>
	</children>
</VBox>
The strange thing is, that the TitledPanes wont resize correctly ... Its just working if I remove the VBox.vgrow ... but than the TitledPanes wont resize over a maximum Height, even if I set Double.Max_Value as maxHeight.

Anyone has a Idea how to manage these TitledPanes in a VBox?
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 27 2012
Added on Jan 25 2012
12 comments
5,565 views