Is it possible to join, or group together, 2 or more objects into a single object?
Thanks, Randy
Am 07.02.2005 um 01:29 schrieb Randy Heiland:
Is it possible to join, or group together, 2 or more objects into a single object?
Yes, this is called "embedding". You can use any object as container. You might want to start with a rectangle perhaps (because it's easy to make transparent later). Just make it large enough, move another object on top of it and select "embed into" from the red halo handle's menu.
- Bert -
Joining is done by embedding.
Objects can be set to automatically embed dropped objects (see red halo menu). Playfields are already set that way. So a transparent playfield can hold many objects. If the objects are made sticky, then ordinary mouse clicks will not pick them up (but atl-clicks will still get the halo). If the objects are locked, then they will be indifferent to the mouse (and will have to be unlocked to be accessed). Finally, if you drop any object on any other object, you can embed it via the embed button in the red halo menu. The popup will give you choices if there are various stacked objects to choose as the holder, etc.
Cheers,
Alan
----------
At 04:29 PM 2/6/2005, Randy Heiland wrote:
Is it possible to join, or group together, 2 or more objects into a single object?
Thanks, Randy
Squeakland mailing list Squeakland@squeakland.org http://squeakland.org/mailman/listinfo/squeakland
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.
squeakland@lists.squeakfoundation.org