AlignmentMorph obsolete so what do I use?
Jerome Chan
eviltofu at mac.com
Sun Jul 7 22:39:12 UTC 2002
When I resize a window, the button sizes all change. I don't want that to
happen.
On Sunday, July 7, 2002, at 11:19 PM, Ned Konz wrote:
> Why do you need a parent morph at all? Just add framing specs for each
> of the buttons...
>
> Anyway, you need to ask yourself:
> * do you need a separate background color
> * do you need a border
>
> If the answer to either of the two is "yes", then use a Morph as a
> parent.
>
> Anyway, there's still 232 references to AlignmentMorph in my image; I
> don't think it's going away anytime soon.
>
> If you're using the RectangleMorph successfully, there's nothing wrong
> with using it.
>
> However, if you want to change from AlignmentMorph, just do this:
>
> myMorph layoutPolicy: TableLayout new.
> myMorph listDirection: #leftToRight.
> myMorph hResizing: #spaceFill.
> myMorph vResizing: #spaceFill.
> myMorph cellInset: 2. "or whatever you want"
> myMorph layoutInset: 4. "or whatever you want"
More information about the Squeak-dev
mailing list
|