AlignmentMorph obsolete so what do I use?
Ned Konz
ned at bike-nomad.com
Sun Jul 7 15:19:47 UTC 2002
On Saturday 06 July 2002 07:59 am, Jerome Chan wrote:
> Since AlignmentMorph is now obsolete what Morph should I use to
> make a horizontal collection of ButtonMorphs? I am building a
> SystemWindow with 2 panes. The top pane is a PluggableListMorph for
> data selection and the bottom pane a row of ButtonMorphs for
> adding, editing and removing the items listed in the top pane.
>
> Right now I am using RectangleMorph. Or should I just continue
> using AlignmentMorph?
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"
--
Ned Konz
http://bike-nomad.com
GPG key ID: BEEA7EFE
More information about the Squeak-dev
mailing list
|