[squeak-dev] Re: TextMorph takes to much space in layout
Sean P. DeNigris
sean at clipperadams.com
Sun Aug 14 11:59:05 UTC 2011
r2ruyu-nana wrote:
>
> How to get it right from the beginning on? Without doing explicitly 'w
> layoutChanged'.
>
Welcome! And welcome to the esoteric arts of Morphic layout. I find this to
be by far the most mind-boggling area of the image. You actually got away
easy with the layoutChanged trick.
r2ruyu-nana wrote:
>
> "width: 300;"
> backgroundColor: Color veryLightGray;
> hResizing: #spaceFill.
>
The last line is your problem. You're specifically telling the TextMorph to
fill the horizontal space. However, if you change it to #rigid, you will not
be any happier because the text will be all scrunched up vertically.
However, if you pair #rigid with #contents: instead of contentsWrapped:
TextMorph new contents: 'Some very very very very long string...'.
you will have the same size as after layoutChanged without the explicit
width: setting.
HTH,
Sean
--
View this message in context: http://forum.world.st/TextMorph-takes-to-much-space-in-layout-tp3741528p3742760.html
Sent from the Squeak - Dev mailing list archive at Nabble.com.
More information about the Squeak-dev
mailing list
|