I guess my approach was wrong. I should use a qx.ui.embed.Html instead of
qx.ui.basic.Label, since this widget has scroll bars included. Howver,
qx.ui.embed.Html seems to have the same problem, it is not correcly layouted
by the parent layout, or at least it seems. If you test this snippet in the
0.8.3-pre playground:

      var qxComposite1 = new qx.ui.container.Composite();
      qxComposite1.setLayout( new qx.ui.layout.Grow() )
      var noteHtmlView = new qx.ui.embed.Html( "Loading..." );
      noteHtmlView.setHtml( "Loading..." );
      noteHtmlView.setOverflowY( "scroll" );
      qxComposite1.add( noteHtmlView );
      this.getRoot().add(qxComposite1);

you can see that the embedHtml widget is not taking the space it should
(with the grow layout, it should span the available space).

Or am I misunderstanding something here?

Thanks,

Christian 



panyasan wrote:
> 
> Hi, I am loading a qx.ui.basic.Label with text from the server. Since it
> can be a long html text, I want to be able to scroll the text, so I am
> packing the label into a scroll container, which itself is packed into a
> composite widget with a VBox layout:
> 
>      qxComposite1 = new qx.ui.container.Composite();
>      var qxVbox1 = new qx.ui.layout.VBox( null, null, null );
>      qxComposite1.setLayout( qxVbox1 )
>      var qxScroll1 = new qx.ui.container.Scroll();
>      qxComposite1.add( qxScroll1,
>       {
>         flex : 1
>       } );
>       var qxVbox2 = new qx.ui.layout.VBox( null, null, null );
>       var qxComposite2 = new qx.ui.container.Composite();
>       qxComposite2.setLayout( qxVbox2 )
>       qxComposite2.setPadding( 5 );
>       qxScroll1.add( qxComposite2 );
>       var noteHtmlView = new qx.ui.basic.Label( null );
>       noteHtmlView.setRich( true );
>       noteHtmlView.setWidgetId( "noteHtmlView" );
>       noteHtmlView.setValue( "Loading" );
>       qxComposite2.add( noteHtmlView );
> 
> However, the scroll container always has a fixed with and does not adapt
> its height when the container (qxComposite1) changes its height
> (qxComposite1 is in a split pane widget).
> 
> Is this a bug or can't the scroll pane have dynamic sizing within a
> layout?
> 
> Thanks,
> 
> Christian 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/automatically-resizing-qx.ui.container.Scroll---tp25133559p25134214.html
Sent from the qooxdoo-devel mailing list archive at Nabble.com.


------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to