TableLayout not quite working right?
Andreas Raab
Andreas.Raab at gmx.de
Fri Apr 5 22:29:45 UTC 2002
Ken,
> How much of this am I misunderstanding
> and how much is just broke?
The first part is misunderstood and the second broke. Note that
#addMorph: will add the morph at the _beginning_ of the submorph chain,
thus the text morph with number 3 is - although the last in your adding
sequence - the first in the morph chain. And naturally the first object
in the chain of morphs comes out top-most. Change your code to use
#addMorphBack: and it'll come out all right.
The second part (with #bottomToTop) is broke.
Cheers,
- Andreas
> -----Original Message-----
> From: squeak-dev-admin at lists.squeakfoundation.org
> [mailto:squeak-dev-admin at lists.squeakfoundation.org] On
> Behalf Of Ken Causey
> Sent: Saturday, April 06, 2002 12:00 AM
> To: Squeak Devel List
> Subject: TableLayout not quite working right?
>
>
> I'm using 3.2g-4811. Some code:
>
> r _ RectangleMorph new
> layoutPolicy: (TableLayout new);
> vResizing: #shrinkWrap;
> hResizing: #shrinkWrap;
> listDirection: #topToBottom.
> {'1'. '2'. '3'} do: [ :item |
> r addMorph:
> (StringMorph new contents: item).
> r addMorph:
> (TextMorph new contents: 'Number ', item;
> borderWidth: 1;
> autoFit: false;
> extent: 200 at 15)].
> r openInHand.
>
> First of all, this seems to render upside down. The
> StringMorph 1 is on
> the bottom and the TextMorph with 'Number 3' is on the top.
> Change the
> RectangleMorph's listDirection: to #bottomToTop, now the order seems
> correct (or actually wrong again, but correct for
> #topToBottom) but now
> the vResizing: #shrinkWrap is not honored. The RectangleMorph has its
> default size and can be resized.
>
> How much of this am I misunderstanding and how much is just broke?
>
> Ken Causey
>
>
>
>
>
>
More information about the Squeak-dev
mailing list
|