[Newbies] Morphic Layout

Gauland, Michael Michael.Gauland at airways.co.nz
Mon Nov 3 21:34:21 UTC 2008

I've done some poking around with TableLayout, and I'm starting to get a feel for how it works. One that I haven't puzzled out is how to make a morph (I'm using a TextMorph inside a BorderedMorph) expand and contract as its containing morph (in my case, another BorderedMorph) is resized.  Any advice on this would be appreciated.


-----Original Message-----
From: beginners-bounces at lists.squeakfoundation.org [mailto:beginners-bounces at lists.squeakfoundation.org] On Behalf Of Herbert König
Sent: Thursday, 30 October 2008 9:51 a.m.
To: A friendly place to get answers to even the most basic questions aboutSqueak.
Subject: Re: [Newbies] Morphic Layout

Hello Michael,

GM> Can anyone help me learn the 'modern' way oflaying out
GM> morphs? I'm trying to create a stack-based ('RPN')calculate in
GM> So, what is the best way to layout a set of morphs? At
GM> leastfor now, all I need is a grid of buttons, that will look
GM> sensible when theparent calculator morph is resized.

TableLayout is your friend here. The class comment gives some hints. A
week or so ago there was a discussion about Morphic table layouts,
there you can find hints where to get grid layouts.

In general you can send a Morph
layoutPolicy: TableLayout new

I suggest you create a Morph, add a TableLayout like above, bring up
the halo, the red button offers layout.

There you can experiment and see the options you have.

If you don't look into the thread in Squeak dev, beware TableLayout
is no real table layout but a row or column layout.



Beginners mailing list
Beginners at lists.squeakfoundation.org

This electronic message together with any attachments is confidential. If
you receive it in error: (i) you must not use, disclose, copy or retain
it; (ii) please contact the sender immediately by reply email and then
delete the emails. Views expressed in this email may not be those of the
Airways Corporation of New Zealand Limited

More information about the Beginners mailing list