pivot-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Noel Grandin <noelgran...@gmail.com>
Subject Re: ScrollPane usage problem
Date Fri, 23 Mar 2012 08:50:02 GMT

You can't call add(Component) on a ScrollPane.

You need to call setView(Component), and there can be only one.

On 2012-03-23 09:15, ccp999 wrote:
> Hi,
>
> I was trying to use ScrollPane inside Accordion panels to display a list
> view of data.
> in my bxml file,
>
> ...
> <Accordion bxml:id="centerAccordion">
> <ScrollPane bxml:id="annotationsPanel" Accordion.headerData="%Annotations"
> />
> </Accordion>
> ...
>
> and inside my java file,
>
> @BXML
> protected ScrollPane annotationsPanel = null;
>
> Component annotationPane = tabAdapter.getAnnotationPane();
> annotationsPanel.add(annotationPane);
>
> public Component getAnnotationPane() {
>
> 		BoxPane bp = new BoxPane();
> 		bp.setOrientation(Orientation.VERTICAL);
> 		bp.getStyles().put("fill", true);
> 		for (Annotate node : annotations) {
>
> 			BXMLSerializer bxmlSerializer = new BXMLSerializer();
> 			AnnotateTablePane itemRenderer;
> 			try {
> 				itemRenderer = (AnnotateTablePane) bxmlSerializer
> 						.readObject(getClass().getResource(
> 								"../thumbnail/AnnotateTablePane.bxml"));
> 			} catch (IOException e1) {
> 				return null;
> 			} catch (SerializationException e1) {
> 				return null;
> 			}
> 			bp.add(itemRenderer);
> 		}
> 		return bp;
> 	}
>
> AnnotateTablePane.bxml is just a table pane with a group of components.
>
> Despite all my effort, the content within the bp never shown up, unless I
> change the ScrollPane to BoxPane. But then I will lost the view for large
> list.
>
> There must be something I missed.  Please help!
>
> Brendan
>
>
> --
> View this message in context: http://apache-pivot-users.399431.n3.nabble.com/ScrollPane-usage-problem-tp3850859p3850859.html
> Sent from the Apache Pivot - Users mailing list archive at Nabble.com.

Mime
View raw message