MorphLayout

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

MorphLayout

Camillo Bruni
Hi,

I am looking for a sort of FlowLayout which works the same way usually text is handled:
All submorphs are put on a single line and wrapped when the border is hit.

Is there already a layout which does this?
Reply | Threaded
Open this post in threaded view
|

Re: MorphLayout

Gary Chambers-4
The standard TableLayout can do this using the #wrapDirection property,
e.g.:

|builder|
builder := UITheme builder.
(builder newRow: {
 Morph new color: Color red.
 Morph new color: Color yellow.
 Morph new color: Color green.
 Morph new color: Color blue.
 Morph new color: Color orange})
 cellInset: 10;
 wrapDirection: #topToBottom;
 openInWindow

Regards, Gary

----- Original Message -----
From: "Camillo Bruni" <[hidden email]>
To: "Pharo Development" <[hidden email]>
Sent: Monday, August 29, 2011 10:57 AM
Subject: [Pharo-project] MorphLayout


Hi,

I am looking for a sort of FlowLayout which works the same way usually text
is handled:
All submorphs are put on a single line and wrapped when the border is hit.

Is there already a layout which does this?


Reply | Threaded
Open this post in threaded view
|

Re: MorphLayout

Camillo Bruni
perfect :) thanks

On 2011-08-30, at 12:44, Gary Chambers wrote:

> The standard TableLayout can do this using the #wrapDirection property, e.g.:
>
> |builder|
> builder := UITheme builder.
> (builder newRow: {
> Morph new color: Color red.
> Morph new color: Color yellow.
> Morph new color: Color green.
> Morph new color: Color blue.
> Morph new color: Color orange})
> cellInset: 10;
> wrapDirection: #topToBottom;
> openInWindow
>
> Regards, Gary
>
> ----- Original Message ----- From: "Camillo Bruni" <[hidden email]>
> To: "Pharo Development" <[hidden email]>
> Sent: Monday, August 29, 2011 10:57 AM
> Subject: [Pharo-project] MorphLayout
>
>
> Hi,
>
> I am looking for a sort of FlowLayout which works the same way usually text is handled:
> All submorphs are put on a single line and wrapped when the border is hit.
>
> Is there already a layout which does this?
>