[General] Morph Padding & Margin

Previous Topic Next Topic
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

[General] Morph Padding & Margin

Philip Weaver
What's the proper way to affect/construct padding or margins for Morphs?
I've never really wrangled it and have just been using a separate margin
insets property in the morphs I use for layout.
I'm accustomed to using Insets from Swing. In Lively, it looks like I need
to be using Rectangle.insetBy or Rectangle.expandBy.

If I simply assign a Rectangle as padding - e.g. new Rectangle(0, 50, 0, 0)
- that adds 50 pixels of padding to the top *and* to the bottom (TextMorph).
Is this the proper behavior?

I am currently investigating this - but still want to ask.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://livelykernel.sunlabs.com/pipermail/general/attachments/20090422/ebd5c1a1/attachment.html