Row-column widgets
The row-column widget (CwRowColumn) positions its children in rows or columns. CwRowColumn widgets are frequently used to lay out groups of buttons, including pop-up and pull-down menus. You can also use them to lay out widgets in a table. Create row-column widgets using the createRowColumn:argBlock: convenience method.
Some commonly used row-column resources are the orientation, marginWidth, marginHeight and spacing resources. The orientation resource specifies that the layout is either row major or column major. In a column major layout, specified by XmVERTICAL, the children are laid out in columns top to bottom. In a row major layout, specified by XmHORIZONTAL, the children are laid out in rows. The default orientation is XmVERTICAL. The marginWidth and marginHeight resources specify the size of the margin between the child widgets and the edges of the row-column. The spacing resource specifies the spacing between child widgets.
In the following illustration, the buttons on the left are organized in a row-column widget. The row-column and the drawing area are contained in a form, similar to the previous example.

Row-column widget
The following code creates the example shown above:
| shell form rowColumn drawing |
shell := CwTopLevelShell
createApplicationShell: 'shell'
argBlock: [:w | w title: 'RowColumn Example'].
form := shell
createForm: 'form'
argBlock: nil.
form manageChild.
rowColumn := form
createRowColumn: 'rooms'
argBlock: [:w |
orientation: XmVERTICAL;
marginWidth: 10;
marginHeight: 10;
spacing: 20;
leftAttachment: XmATTACHFORM;
topAttachment: XmATTACHFORM;
bottomAttachment: XmATTACHFORM].
rowColumn manageChild.
#('Kitchen' 'Dining Room' 'Living Room' 'Washroom' 'Bedroom' 'Workshop')
do: [:room |
createPushButton: room
argBlock: nil)
drawing := form
createDrawingArea: 'drawing'
argBlock: [:w |
borderWidth: 1;
width: 300;
leftAttachment: XmATTACHWIDGET;
leftWidget: rowColumn;
leftOffset: 2;
rightAttachment: XmATTACHFORM;
rightOffset: 2;
topAttachment: XmATTACHFORM;
topOffset: 2;
bottomAttachment: XmATTACHFORM;
bottomOffset: 2].
drawing manageChild.
shell realizeWidget.
Last modified date: 12/21/2017