[Cuis] How to center a submorph in its owner morph?

H. Hirzel hannes.hirzel at gmail.com
Fri Feb 8 11:07:54 CST 2013


Works fine, thank you, Juan

--Hannes

On 2/8/13, Juan Vuletich <juan at jvuletich.org> wrote:
> Hi Hannes,
>
> Something like:
>
> | row |
> row := LayoutMorph newRow.
> row
>      color: Color green;
>      addMorph: (BorderedRectMorph new color: (Color h: 60 s: 0.6 v: 0.6)).
> row padding: #center.
> row openInWorld.
> row morphPosition: 150 at 130
>
> If you use a Column and not a Row, you don't even need to specify the
> #padding:, as it defaults to #center.
>
> Cheers,
> Juan Vuletich
>
> On 2/7/2013 12:32 PM, H. Hirzel wrote:
>> Hello
>>
>> I want to add an instance of ImageMorph to an instance of  Morph and
>> center it there?
>>
>> How do I do that?
>>
>> I have done experiments with newRow and newColumn layout, see
>>    https://github.com/hhzl/Cuis-Add-Ons
>>
>> But I do not have examples yet of centering.
>>
>> Thank you for the answer in advance.
>>
>> Hannes
>>
>> _______________________________________________
>> Cuis mailing list
>> Cuis at jvuletich.org
>> http://jvuletich.org/mailman/listinfo/cuis_jvuletich.org
>>
>>
>> -----
>> Se certifico que el correo no contiene virus.
>> Comprobada por AVG - www.avg.es
>> Version: 2013.0.2897 / Base de datos de virus: 2639/6087 - Fecha de la
>> version: 07/02/2013
>>
>>
>
>
> _______________________________________________
> Cuis mailing list
> Cuis at jvuletich.org
> http://jvuletich.org/mailman/listinfo/cuis_jvuletich.org
>




More information about the Cuis mailing list