qx.ui.container.Scroll: ARGH!

classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|

qx.ui.container.Scroll: ARGH!

dmbaggett-2

So I spent another 4+ hours yesterday doing battle with the Scroll container.
I just cannot seem to get this container to work right for me.

Here's my scenario. I want to put a Scroll and a Composite inside a
Composite. I want these two to flex equally, so that each gets half the
size. I want the Scroll to automagically put up scroll bars when its own
contents won't fit without them.

But there seem to be many problems: Scroll won't autosize to the flex limit.
I tried setting the Scroll's height to null, and that doesn't work: it seems
the Scroll gets too greedy, and uses way too much of the flex space,
stealing it from its Composite sibling.

And when I put a groupbox in the scroll, the vertical scroll bar doesn't
"reach" far enough down for me to see the bottom of my groupbox; I can't
scroll the bottom of it into view. I have to add a magic padding of 24
pixels for no obvious reason.

I have to admit that this is my fourth time struggling with Scroll. I am
about to throw in the towel and redesign my UI so that I don't need a
scrolling container. :)

Are there known problems with Scroll? Maybe I am assuming it does something
it's not meant to do? I think a clarification of its usage would be really
helpful.

Dave

--
View this message in context: http://www.nabble.com/qx.ui.container.Scroll%3A-ARGH%21-tp25768354p25768354.html
Sent from the qooxdoo-devel mailing list archive at Nabble.com.


------------------------------------------------------------------------------
Come build with us! The BlackBerry® Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9-12, 2009. Register now!
http://p.sf.net/sfu/devconf
_______________________________________________
qooxdoo-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
Reply | Threaded
Open this post in threaded view
|

Re: qx.ui.container.Scroll: ARGH!

dmbaggett-2

Also, just to add another point I forgot: it would be really nice to see an
explanation of the difference between these concepts:

  layout flex
  allowGrowX/Y
  allowShrinkX/Y
  allowStretchX/Y

I'm sure this is incredibly confusing for new QooxDoo users, and it still
confuses me. I just try these things somewhat randomly when I have layout
problems. That's probably not the most principled strategy. :)

Dave

--
View this message in context: http://www.nabble.com/qx.ui.container.Scroll%3A-ARGH%21-tp25768354p25768380.html
Sent from the qooxdoo-devel mailing list archive at Nabble.com.


------------------------------------------------------------------------------
Come build with us! The BlackBerry® Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9-12, 2009. Register now!
http://p.sf.net/sfu/devconf
_______________________________________________
qooxdoo-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
Reply | Threaded
Open this post in threaded view
|

Re: qx.ui.container.Scroll: ARGH!

Skar-3
dmbaggett wrote:

> Also, just to add another point I forgot: it would be really nice to see an
> explanation of the difference between these concepts:
>
>   layout flex
>   allowGrowX/Y
>   allowShrinkX/Y
>   allowStretchX/Y
>
> I'm sure this is incredibly confusing for new QooxDoo users, and it still
> confuses me. I just try these things somewhat randomly when I have layout
> problems. That's probably not the most principled strategy. :)
>  
Yes, I too get confused by these things. I'm currently setting Min and
Max height for a composite inside the scroll container whenever any
widgets resize, that way I'm able to make sure that I have the right
sized composite which makes sure the parent scroll container shows the
scroll bars at the right times :)

I also add some padding of 150 px height to make sure the widgets all
fit inside the composite. Don't know which widget's
padding/margin/height I neglected to add to the height of the composite
container. I only have 2-3 labels, button bar and a table inside the
composite, which is inside a scroll. So random padding shouldn't be
necessary, but somewhere I'm missing something. Still it works with
extra padding of 150 px, so it's ok.

cheers,
skar.

--
--
The life so short, the craft so long to learn.


------------------------------------------------------------------------------
Come build with us! The BlackBerry® Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9-12, 2009. Register now!
http://p.sf.net/sfu/devconf
_______________________________________________
qooxdoo-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
Reply | Threaded
Open this post in threaded view
|

Re: qx.ui.container.Scroll: ARGH!

Christian Schmidt
In reply to this post by dmbaggett-2
Hi Dave,

could you please send your current code example? Perhaps I can take a
look at it.

I found an article about layouting [1]. I don't know if this answers
your questions about growing and shrinking. If not  please ask, perhaps
the article missed something.

Cheers,
Chris

[1] http://qooxdoo.org/documentation/0.8/ui_layouting

dmbaggett schrieb:

> So I spent another 4+ hours yesterday doing battle with the Scroll container.
> I just cannot seem to get this container to work right for me.
>
> Here's my scenario. I want to put a Scroll and a Composite inside a
> Composite. I want these two to flex equally, so that each gets half the
> size. I want the Scroll to automagically put up scroll bars when its own
> contents won't fit without them.
>
> But there seem to be many problems: Scroll won't autosize to the flex limit.
> I tried setting the Scroll's height to null, and that doesn't work: it seems
> the Scroll gets too greedy, and uses way too much of the flex space,
> stealing it from its Composite sibling.
>
> And when I put a groupbox in the scroll, the vertical scroll bar doesn't
> "reach" far enough down for me to see the bottom of my groupbox; I can't
> scroll the bottom of it into view. I have to add a magic padding of 24
> pixels for no obvious reason.
>
> I have to admit that this is my fourth time struggling with Scroll. I am
> about to throw in the towel and redesign my UI so that I don't need a
> scrolling container. :)
>
> Are there known problems with Scroll? Maybe I am assuming it does something
> it's not meant to do? I think a clarification of its usage would be really
> helpful.
>
> Dave
>
>  


--
Christian Schmidt
Software Entwickler

1&1 Internet AG - Web Technologies
Ernst-Frey-Straße 9 · DE-76135 Karlsruhe
[hidden email]

Amtsgericht Montabaur / HRB 6484
Vorstände: Henning Ahlert, Ralph Dommermuth, Matthias Ehrlich, Thomas Gottschlich, Robert Hoffmann, Markus Huhn, Hans-Henning Kettler, Dr. Oliver Mauss, Jan Oetjen
Aufsichtsratsvorsitzender: Michael Scheeren


------------------------------------------------------------------------------
Come build with us! The BlackBerry® Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9-12, 2009. Register now!
http://p.sf.net/sfu/devconf
_______________________________________________
qooxdoo-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
Reply | Threaded
Open this post in threaded view
|

Re: qx.ui.container.Scroll: ARGH!

dmbaggett-2

>could you please send your current code example? Perhaps I can take a look
at it.

I was afraid you were going to say that. :)  The problem is that it's
written in terms of my form compiler, and it's not easy to redo it as "raw"
QooxDoo code. I plan to make the compiler a contrib at some point, but I'm
trying to get a release out just now and won't have time to do until later
this year.

As an alternative, I might suggest adding a demo to the demobrowser with a
flexing Scroll containing variable-sized content. Then Scroll users can just
crib from the demo code. In the process of writing that, I'm sure you will
run across similar problems to the ones I have -- I've tried this four
different ways and ended up with very similar problems each time. :/

I've read the layout tutorial and it's indeed very helpful. I guess my
confusion mainly centers around how these things all interact together. It
might clear things up a lot to see a high-level pseudo-code description of
what exactly happens during the layout process. Sort of like the discussion
of events: in that narrative you specifically describe what's happening and
when, how things are (in effect) delegated from one widget to the next.
(Like the event code, the layout code is quite difficult to follow in the
source, because it's spread out across many classes.)

Dave


Hi Dave,

could you please send your current code example? Perhaps I can take a
look at it.

I found an article about layouting [1]. I don't know if this answers
your questions about growing and shrinking. If not  please ask, perhaps
the article missed something.

Cheers,
Chris

[1] http://qooxdoo.org/documentation/0.8/ui_layouting

--
View this message in context: http://www.nabble.com/qx.ui.container.Scroll%3A-ARGH%21-tp25768354p25770509.html
Sent from the qooxdoo-devel mailing list archive at Nabble.com.


------------------------------------------------------------------------------
Come build with us! The BlackBerry® Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9-12, 2009. Register now!
http://p.sf.net/sfu/devconf
_______________________________________________
qooxdoo-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
Reply | Threaded
Open this post in threaded view
|

Re: qx.ui.container.Scroll: ARGH!

Thomas Herchenroeder

> I was afraid you were going to say that. :)  The problem is that it's
> written in terms of my form compiler, and it's not easy to redo it as "raw"
> QooxDoo code. I plan to make the compiler a contrib at some point, but I'm
> trying to get a release out just now and won't have time to do until later
> this year.
>
> As an alternative, I might suggest adding a demo to the demobrowser with a
> flexing Scroll containing variable-sized content. Then Scroll users can just
> crib from the demo code. In the process of writing that, I'm sure you will
> run across similar problems to the ones I have -- I've tried this four
> different ways and ended up with very similar problems each time. :/
>  

Dave, it would be very helpful if you provided us with a skeleton app
that reproduces the problems, maybe showing different scenrios with
different properties coming into play. I understand you're working on
your compiler, but this would be more tangible than a mere description,
and might then be fed into both doc improvements and a demo :).


T.


>  

------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
qooxdoo-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
Reply | Threaded
Open this post in threaded view
|

Re: qx.ui.container.Scroll: ARGH!

Fabian Jakobs
Administrator
In reply to this post by dmbaggett-2
dmbaggett schrieb:

> So I spent another 4+ hours yesterday doing battle with the Scroll container.
> I just cannot seem to get this container to work right for me.
>
> Here's my scenario. I want to put a Scroll and a Composite inside a
> Composite. I want these two to flex equally, so that each gets half the
> size. I want the Scroll to automagically put up scroll bars when its own
> contents won't fit without them.
>
> But there seem to be many problems: Scroll won't autosize to the flex limit.
> I tried setting the Scroll's height to null, and that doesn't work: it seems
> the Scroll gets too greedy, and uses way too much of the flex space,
> stealing it from its Composite sibling.
>
> And when I put a groupbox in the scroll, the vertical scroll bar doesn't
> "reach" far enough down for me to see the bottom of my groupbox; I can't
> scroll the bottom of it into view. I have to add a magic padding of 24
> pixels for no obvious reason.
>
> I have to admit that this is my fourth time struggling with Scroll. I am
> about to throw in the towel and redesign my UI so that I don't need a
> scrolling container. :)
>
> Are there known problems with Scroll? Maybe I am assuming it does something
> it's not meant to do? I think a clarification of its usage would be really
> helpful.
>
> Dave
>  

Hi Dave,

I think the problems you are facing result from the fact that the scroll
container has a minHeigh and minWidth of 60px. This is set in the
appearance to make sure the scroll bars remain usable. Since the scroll
container will never be smaller than 64px you sometimes see only parts
of it. Further this will override any height or width value smaller than
64px. You should try setting the min size of the scrollbar manually to
0. Then set the height of the inner composite and the scroll container
to the same size so flex calculation gives both widgets the same
additional space.

I hope this helps,

Best Fabian

--
Fabian Jakobs
JavaScript Framework Developer

1&1 Internet AG - Web Technologies
Ernst-Frey-Straße 9 · DE-76135 Karlsruhe
Telefon: +49 721 91374-6784
[hidden email]

Amtsgericht Montabaur / HRB 6484
Vorstände: Henning Ahlert, Ralph Dommermuth, Matthias Ehrlich, Thomas Gottschlich, Robert Hoffmann, Markus Huhn, Hans-Henning Kettler, Dr. Oliver Mauss, Jan Oetjen
Aufsichtsratsvorsitzender: Michael Scheeren


------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
qooxdoo-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
Reply | Threaded
Open this post in threaded view
|

Re: qx.ui.container.Scroll: ARGH!

Fabian Jakobs
Administrator
In reply to this post by dmbaggett-2
Hi Dave
> Also, just to add another point I forgot: it would be really nice to see an
> explanation of the difference between these concepts:
>
>   layout flex
>  
layout flex defines the factor remaining space is distributed among flex
widgets. If one widget has a flex value of 1 and another widget has a
flex value of 2 the second widget will receive twice as much additional
space as the first one. The same is true for shrinking with the
exception that the values are inverted 2 -> 1/2.
>   allowGrowX/Y
>  
This sets the general ability of the widget to grow beyond its preferred
size. However the widget will never be larger than its max size.
>   allowShrinkX/Y
>  
Allows the widget to shrink beelow its preferred size. Analogous to
allowGrowX/Y
>   allowStretchX/Y
>  
This is a property group for allowGrow and allowShrink.
allowStretchX(true) will set allowGrowX(true) and allowShrinkX(true)

> I'm sure this is incredibly confusing for new QooxDoo users, and it still
> confuses me. I just try these things somewhat randomly when I have layout
> problems. That's probably not the most principled strategy. :)
>
> Dave
>
>  


Best Fabian

--
Fabian Jakobs
JavaScript Framework Developer

1&1 Internet AG - Web Technologies
Ernst-Frey-Straße 9 · DE-76135 Karlsruhe
Telefon: +49 721 91374-6784
[hidden email]

Amtsgericht Montabaur / HRB 6484
Vorstände: Henning Ahlert, Ralph Dommermuth, Matthias Ehrlich, Thomas Gottschlich, Robert Hoffmann, Markus Huhn, Hans-Henning Kettler, Dr. Oliver Mauss, Jan Oetjen
Aufsichtsratsvorsitzender: Michael Scheeren


------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
qooxdoo-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
Reply | Threaded
Open this post in threaded view
|

Re: qx.ui.container.Scroll: ARGH!

dmbaggett-2
In reply to this post by Fabian Jakobs

I will try that -- thanks. Also, thanks for the explanation of allowStretch.
I did not understand that it was just a property group. That helps a lot. :)

Dave


Fabian Jakobs wrote:

>
> dmbaggett schrieb:
>> So I spent another 4+ hours yesterday doing battle with the Scroll
>> container.
>> I just cannot seem to get this container to work right for me.
>>
>> Here's my scenario. I want to put a Scroll and a Composite inside a
>> Composite. I want these two to flex equally, so that each gets half the
>> size. I want the Scroll to automagically put up scroll bars when its own
>> contents won't fit without them.
>>
>> But there seem to be many problems: Scroll won't autosize to the flex
>> limit.
>> I tried setting the Scroll's height to null, and that doesn't work: it
>> seems
>> the Scroll gets too greedy, and uses way too much of the flex space,
>> stealing it from its Composite sibling.
>>
>> And when I put a groupbox in the scroll, the vertical scroll bar doesn't
>> "reach" far enough down for me to see the bottom of my groupbox; I can't
>> scroll the bottom of it into view. I have to add a magic padding of 24
>> pixels for no obvious reason.
>>
>> I have to admit that this is my fourth time struggling with Scroll. I am
>> about to throw in the towel and redesign my UI so that I don't need a
>> scrolling container. :)
>>
>> Are there known problems with Scroll? Maybe I am assuming it does
>> something
>> it's not meant to do? I think a clarification of its usage would be
>> really
>> helpful.
>>
>> Dave
>>  
>
> Hi Dave,
>
> I think the problems you are facing result from the fact that the scroll
> container has a minHeigh and minWidth of 60px. This is set in the
> appearance to make sure the scroll bars remain usable. Since the scroll
> container will never be smaller than 64px you sometimes see only parts
> of it. Further this will override any height or width value smaller than
> 64px. You should try setting the min size of the scrollbar manually to
> 0. Then set the height of the inner composite and the scroll container
> to the same size so flex calculation gives both widgets the same
> additional space.
>
> I hope this helps,
>
> Best Fabian
>
> --
> Fabian Jakobs
> JavaScript Framework Developer
>
> 1&1 Internet AG - Web Technologies
> Ernst-Frey-Straße 9 · DE-76135 Karlsruhe
> Telefon: +49 721 91374-6784
> [hidden email]
>
> Amtsgericht Montabaur / HRB 6484
> Vorstände: Henning Ahlert, Ralph Dommermuth, Matthias Ehrlich, Thomas
> Gottschlich, Robert Hoffmann, Markus Huhn, Hans-Henning Kettler, Dr.
> Oliver Mauss, Jan Oetjen
> Aufsichtsratsvorsitzender: Michael Scheeren
>
>
> ------------------------------------------------------------------------------
> Come build with us! The BlackBerry(R) Developer Conference in SF, CA
> is the only developer event you need to attend this year. Jumpstart your
> developing skills, take BlackBerry mobile applications to market and stay
> ahead of the curve. Join us from November 9 - 12, 2009. Register now!
> http://p.sf.net/sfu/devconference
> _______________________________________________
> qooxdoo-devel mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
>
>

--
View this message in context: http://www.nabble.com/qx.ui.container.Scroll%3A-ARGH%21-tp25768354p25787582.html
Sent from the qooxdoo-devel mailing list archive at Nabble.com.


------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
qooxdoo-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
Reply | Threaded
Open this post in threaded view
|

Re: qx.ui.container.Scroll: ARGH!

dmbaggett-2
In reply to this post by Thomas Herchenroeder

My queue of QooxDoo-related tasks is getting quite long, but I will try to do
that. :)

Dave


thron7-2 wrote:

>
> Dave, it would be very helpful if you provided us with a skeleton app
> that reproduces the problems, maybe showing different scenrios with
> different properties coming into play. I understand you're working on
> your compiler, but this would be more tangible than a mere description,
> and might then be fed into both doc improvements and a demo :).
>
>
> T.
>
>
>>  
>
> ------------------------------------------------------------------------------
> Come build with us! The BlackBerry(R) Developer Conference in SF, CA
> is the only developer event you need to attend this year. Jumpstart your
> developing skills, take BlackBerry mobile applications to market and stay
> ahead of the curve. Join us from November 9 - 12, 2009. Register now!
> http://p.sf.net/sfu/devconference
> _______________________________________________
> qooxdoo-devel mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
>
>

--
View this message in context: http://www.nabble.com/qx.ui.container.Scroll%3A-ARGH%21-tp25768354p25787597.html
Sent from the qooxdoo-devel mailing list archive at Nabble.com.


------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
qooxdoo-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel