[Squeakland] joining objects

Ned Konz ned at bike-nomad.com
Mon Feb 7 09:34:32 PST 2005


On Sunday 06 February 2005 4:29 pm, Randy Heiland wrote:
> Is it possible to join, or group together, 2 or more objects into a single
> object?

Yes. That is, you can take those objects and make them children of (embed them 
into) another object.

If you select the objects using shift-drag, you will create a SelectionMorph 
that knows about the selected objects. You will see its halo. In its red halo 
menu there should be (depending on your Squeak version) choices like "place 
into a row" and "place into a column". There are also "align" and 
"distribute" actions.

If you choose one of the "place into" actions, a new morph will be created, 
and the selected objects will be embedded into that morph.

If you don't want a strict row or column placement, use the layout menu items 
on the new morph to change the effect.

For instance, to allow arbitrary placement, do this from the new morph's red 
halo menu:

* layout/no layout

Then you can use the resize halo to change the new morph's size, and you can 
use the brown halo handles of the embedded objects to position them within 
the new parent.

You can of course change the color of the new parent, as well as the border 
width and color, so if you want just a group with your objects but don't want 
to see the parent morph, change its color to transparent and its border width 
to 0.

-- 
Ned Konz
http://bike-nomad.com



More information about the Squeakland mailing list