Hi Jim

Isn't that inconsistent with other controls such as a text field which
expand to fill the available space?  For example, if you add a TextField in
exactly the same way, it does not cause the composite to grow.

Here's another example that demonstrates this:  http://tinyurl.com/32l7ums

The size of the outer composite is a factor of the user interface that you
design, eg a list must be big enough (height & width) to be readable, a
toolbar big enough to hold the buttons each of which is big enough for text
and image etc ­ and if a label cannot wrap then it must be high enough and
wide enough to display the text,  but the ability to wrap means only that
the label needs only to be high enough because the width is negotiable.

This becomes an issue for me because I combine tabview pages from various
sources ­ generally speaking, each page is roughly the same size but there
is always some variation and all the other controls expand to fit the
available space without leaving odd gaps at the side.  Having a label at a
fixed width disaffects the autosizing of the entire app and undoes the good
work of the layout classes.

John

From:  Jim Hunter <[email protected]>
Reply-To:  qooxdoo Development <[email protected]>
Date:  Tue, 5 Oct 2010 02:05:23 -0700
To:  qooxdoo Development <[email protected]>
Subject:  Re: [qooxdoo-devel] qx.ui.basic.Label sizing problem

If you don't specifically set the width of the label, how do you expect it
to stop stretching? The label needs to know when to stop and when to wrap
(if you have Wrap set to enabled) unless you tell it where. You have to
remember that the control can not read your mind. If you put a long line of
text into it, it will display it because that is what you asked it to do. So
if you don't want the label to be more then 200 pixels, then
setMaxWidth(200) and your problem is solved.

Jim


On Tue, Oct 5, 2010 at 1:02 AM, John Spackman <[email protected]>
wrote:
> Hi guys
> 
> I find that unless I specifically restrict the width of a qx.ui.basic.Label,
> it will stretch all the other components around it to allow the text to fit
> into one line (as much as possible, anyway).  This is a bit of a pain because
> these label's are usually long descriptions or user-friendly text that is
> expected to go into paragraphs and should fit into the available space as
> opposed to expand the available space to get one long line of text.
> 
> Is there a way to stop Label stretching?  I've tried allowGrowX=false and
> allowStretchX=false with no joy.  Here's my example:
> http://tinyurl.com/2w4btzh
> 
> Thanks
> John
> 

----------------------------------------------------------------------------
-- Beautiful is writing same markup. Internet Explorer 9 supports standards
for HTML5, CSS3, SVG 1.1,  ECMAScript5, and DOM L2 & L3. Spend less time
writing and  rewriting code and more time creating great experiences on the
web. Be a part of the beta today.
http://p.sf.net/sfu/beautyoftheweb__________________________________________
_____ qooxdoo-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

------------------------------------------------------------------------------
Beautiful is writing same markup. Internet Explorer 9 supports
standards for HTML5, CSS3, SVG 1.1,  ECMAScript5, and DOM L2 & L3.
Spend less time writing and  rewriting code and more time creating great
experiences on the web. Be a part of the beta today.
http://p.sf.net/sfu/beautyoftheweb
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to