[Q][Morphic] Is there a FlowLayout manager?
Hannes Hirzel
hannes.hirzel.squeaklist at bluewin.ch
Sat Mar 15 13:56:39 UTC 2003
Tim Olson <tim at io.com> wrote:
> Hannes Hirzel <hannes.hirzel.squeaklist at bluewin.ch> wrote:
> | Hi
> |
> | I'd like to use something like Java's FlowLayout manager to layout
> | submorphs of a Morph
>
> I'm not familiar with "FlowLayout", but from the name, is this perhaps
> what you want? (Note the addition of the listDirection, wrapCentering,
> and wrapDirection messages):
>
> ----
cont _ Morph new.
cont width: 200.
cont height: 150.
cont layoutPolicy: TableLayout new;
listDirection: #leftToRight;
wrapCentering: #topLeft;
wrapDirection: #topToBottom.
20 timesRepeat: [ m_ Morph new.
m height: 25.
m color: Color random.
m width: m width + 20 atRandom - 10.
cont addMorph: m
].
cont openInWorld.
(quotation signs '<' removed so that it can be directly evaluated in the
Celeste mail client)
> ----
>
> -- tim
Yes, exactly. Thank you!
-- Hannes
More information about the Squeak-dev
mailing list
|