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

H. Hirzel hannes.hirzel at gmail.com
Mon Feb 11 16:37:13 CST 2013


Hello Juan

Thank you for the code snippet which shows how to center a submorph,
It works fine, see attached screen shot.

The code is in
https://github.com/hhzl/Cuis-Add-Ons
but it needs the examples from
https://github.com/hhzl/ContentPack (loads slowly as it contains 26 pictures)

On 2/8/13, Juan Vuletich <juan at jvuletich.org> wrote:
> Hi Hannes,
>
> Played a bit with your layout examples. This is great stuff! Very nice
> demos, showing what can be done with so little code.

Thank you.

This is great for
> those who are afraid of doing GUIs!

Yes, indeed. I plan to extend it. The notebook morph might be better
done with a listbox taking the first line of the text as the title.

> Just a comment. In LayoutDemo3c, send #actualContents: and not
> #contents:. In addition, for proper display update, in
> TextModelMorph>>#update:, in the #actualContents branch, before exiting,
> do 'self redrawNeeded.'. I'll add this patch tonight.

Thank you for the code review, the analysis and the solution. It works
fine now with the recommended fix.
Amazing that you can do a tab type of GUI which holds editable texts
with just 5 instance methods.

Regards
Hannes


> 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
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ABCbook.png
Type: image/png
Size: 237323 bytes
Desc: not available
URL: <http://jvuletich.org/pipermail/cuis_jvuletich.org/attachments/20130211/fa348fc6/attachment-0004.png>


More information about the Cuis mailing list