Answer /bNed Konz[To "fix" a specific number of rows and columns] add more interior morphs. For a forced 2 column display, you can do this:
MyMorph (table, left-to-right, no wrap)
column1 (table, top-to-bottom, no wrap)
other morphs
column2 (table, top-to-bottom, no wrap)
other morphs
Andreas made a very nice Active Essay about the layouts. It's on SqueakMap. [See also DecentReviewerNotePad.]
Ramiro Diaz Trepat: Thank you very much for your prompt response Ned. I did think of the layout solution you told me, but as a work around to the problem, because doing it that way I believe you cannot control for instance "row alignment" since the height of the rows is independent between columns. That is if I have labels on the left column and text entry fields on the right column, and I want the labels to be vertically centered with their corresponding entry field on the right side of the row. This would be harder to achieve if the components were of variable heights. If this is so, I think that there is a real need for another TableLayout with the usual characteristics, like the ones in Java or C++ (may be I could develop it :)
Ned Konz: So you could do this:
MyMorph (TableLayout, topToBottom)
row1 (ProportionalLayout or no layout)
label
entry field
row2 (ProportionalLayout or no layout)
label
entry field
Or you could use leftToRight TableLayouts. Just experiment with the 'layout' menu.
Ramiro Diaz Trepat: This produces the same problem but the other way. If you decide to make rows you cannot align columns, if you decide to make columns you cannot align rows. I have come to the conclusion that something like Java's GridBagLayout is really needed in Squeak. I hope I can find the time to code one myself and send it to the list.
- Open up the Objects tool and from the "presentation" category get a Column or a Row.
- Open up a Viewer on that row or column, and choose the "layout" category.
- Now twiddle with the values of the layout parameters in the Viewer; you'll be able to see the results immediately on the morph. Twiddling further parameters in the "color & border" and "basic" categories may also be useful in such explorations.