Hi,
thanks for your quick reply.
I changed the line:
doc.add(scrollContainer, {left: 10, top: 10});
to
doc.add(scrollContainer, {left: 10, top: 10, flex:1});
and removed the lines to set the width and height of scrollContainer.
this generates assertion errors however which say that the canvas
layout does not
support 'flex' property. I don't use the canvas widget myself so I'm
guessing here that
the doc widget is a subclass of canvas (is this right?). Here is the
assert output:
950ms Assertion error! The property 'flex' is not supported by the
canvas layout!: Called assert with 'false'Native.js (line 51)
966ms Stack trace:
qx.core.AssertionError:constructor:48,qx.Class:constructor
wrapper:1526,qx.core.Assert:57,qx.core.Assert:75,qx.core.MAssert:assert:44,qx.ui.layout.Canvas:verifyLayoutProperty:119,qx.ui.core.LayoutItem:updateLayoutProperties:837,qx.ui.core.LayoutItem:setLayoutProperties:778,qx.ui.core.Widget:__addHelper:1966,qx.ui.core.Widget:_add:1736,webrobot.Application:main:76,qx.core.Init:68,qx.event.dispatch.Direct:constructor:99,qx.Interface:347,qx.event.Manager:642,qx.event.Registration:253,qx.event.handler.Application:__fireReady:161,qx.event.handler.Application:101,file:///home/felyahya/t/wr2/webrobot/source/script/webrobot.js:216,file:///home/felyahya/t/wr2/webrobot/source/script/webrobot.js:283Native.js
(line 51)
[Exception... "'The property 'flex' is not supported by the canvas
layout!: Called assert with 'false'' when calling method:
[nsIDOMEventListener::handleEvent]" nsresult: "0x8057001c
(NS_ERROR_XPC_JS_THREW_JS_OBJECT)" location: "<unknown>" data: no]
On Thu, Dec 18, 2008 at 11:22 AM, Gaurav Jauhri <[email protected]> wrote:
> Hi Farid,
>
> Farid Elyahyaoui wrote:
>> Hi people,
>>
>> My main application container consists of a Vbox.
>> After all widgets have been created the size grows and when your
>> browser window is not
>> big enought some parts fall outside the browser window and are "unreachable".
>> For some reason the browser does not add scrollbars to scroll to the
>> 'hidden' parts.
>> What do I need to do to add scrollbars?
>> I tried using this in my application main():
>>
>> var doc = this.getRoot();
>> var scrollContainer= new qx.ui.container.Scroll();
>> scrollContainer.set({
>> width: 1000,
>> height: 650
>> });
>> doc.add(scrollContainer, {left: 10, top: 10});
>> this._mainvb= new qx.ui.container.Composite(new qx.ui.layout.VBox(5));
>> scrollContainer.add(this._mainvb);
>>
>> but actually I don't want to set the width. If I don't do that the
>> scrollcontainer has some default
>> size of 200x200 pixels or so which is too small.
>> What other suggestions are there to add scrollbars around my VBox so
>> that the user can scroll to the
>> parts outside of the browser window?
>> Thanks in advance for all your help.
>>
>> Farid
>>
>>
> When you add the scroll to ur doc , just set the flex property to 1 and
> it should work., for example
>
>
>
> doc.add(scrollContainer, {left: 10, top: 10, flex:1});
>
> Hope this works
>
> Cheers
> Gaurav!!
>
>
>> ------------------------------------------------------------------------------
>> SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada.
>> The future of the web can't happen without you. Join us at MIX09 to help
>> pave the way to the Next Web now. Learn more and register at
>> http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/
>> _______________________________________________
>> qooxdoo-devel mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
>>
>>
>>
>
>
> ------------------------------------------------------------------------------
> SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada.
> The future of the web can't happen without you. Join us at MIX09 to help
> pave the way to the Next Web now. Learn more and register at
> http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/
> _______________________________________________
> qooxdoo-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
>
------------------------------------------------------------------------------
SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada.
The future of the web can't happen without you. Join us at MIX09 to help
pave the way to the Next Web now. Learn more and register at
http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel