Working with IMultiCellCanvas Parts

The following tasks are associated with using an IMultiCellCanvas* part in visual composition. Tasks that are common to many parts are described in related topics.

Using a multicell canvas in a view port
If you drop the IMultiCellCanvas* part on a view port, open the style property in the IViewPort* property sheet and set the expandableViewWindow style to on. This enables the IViewPort* part to automatically add or remove scroll bars based on the minimum size of cells in the IMultiCellCanvas* part.

Laying out the canvas
An IMultiCellCanvas* part is added with the following initial characteristics:

You can lay out the canvas by dropping control parts in cells, spanning controls across cells, adding rows and columns, and defining expansion space between controls. Except for dropping controls, these tasks can be performed either in the Composition Editor window or the Multi-Cell Canvas Layout Prompter window. To open the Multi-Cell Canvas Layout Prompter window, open the canvasLayout property value in the IMultiCellCanvas* property sheet.

Defining margins
If you want margins at the edges of the canvas, do not place controls in the first row or the first column. Reserve them as left and top margins. To create right and bottom margins after you have added other rows and columns, add a row at the right and a column at the bottom. Do not place any controls in the margins.

Adding a control
To add a control to the multicell canvas, drop it in a cell of the IMultiCellCanvas* part. The cell is sized to accommodate the largest minimum size of controls in the row and column. When you add a control to the canvas, consider the following:

Spanning a control across cells
You can change the layout of a control across rows or columns in either the Composition Editor or the Multi-Cell Canvas Layout Prompter window.

Adding a row
You can add a row to the canvas from either the Composition Editor or the Multi-Cell Canvas Layout Prompter window.

Removing a row
You can remove a canvas row from either the Composition Editor or the Multi-Cell Canvas Layout Prompter window.

Adding a column
You can add a column to the canvas from either the Composition Editor or the Multi-Cell Canvas Layout Prompter window.

Removing a column
You can remove a canvas column from either the Composition Editor or the Multi-Cell Canvas Layout Prompter window.

Defining expansion space between controls
To maintain even spacing between controls when the user resizes the canvas, make the rows and columns between controls expandable. The initial expansion space on the right or bottom of the canvas is removed when you make a column or row expandable. Therefore, you might want to define expansion after you have added rows and columns. You can define expandability from either the Composition Editor or the Multi-Cell Canvas Layout Prompter window.


Related procedures
Common Tasks for Control Parts
Setting Part Style Properties
Setting Part Color Properties
Setting Part Font Properties
Setting Part Handlers Properties
Setting Part Framing Properties
Working with VisualAge User Interface Parts

Related references
IMultiCellCanvas
Property Settings -- IMultiCellCanvas
Portability -- IMultiCellCanvas