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:
- 5 rows and 5 columns
- No expandable rows or columns
- Initial design expansion space at the right and
bottom
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:
- If you drop a control in the expansion space
initially provided on the right and bottom of the
canvas, a new row or column is added for the
control.
- To add a set of controls, drop an ISetCanvas*
part on the IMultiCellCanvas* part and drop
controls on the set canvas. If you want to add a
set of controls in a group box, use an
ISetCanvas* part and define it as a group box.
This gives the appearance you want without
sacrificing automatic sizing of controls.
- 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.
- To change the layout of a control in the
Composition Editor, do the following:
- Select the control.
- Press an Alt key and drag a selection
handle at a corner of the control to the
far side of the row and column that the
control is to end in.
- To change the layout of a control in the
Multi-Cell Canvas Layout Prompter window, do the
following for each control boundary that you want
to change:
- In the Layout of controls placed on
the multicell canvas table, select
the Start Row, End Row, Start
Column, or End Column column
for the control.
- Enter the new boundary row or column for
the control. Be careful not to overlay
controls.
- Adding a row
- You can add a row to the canvas from either the
Composition Editor or the Multi-Cell Canvas Layout
Prompter window.
- To add a row from the Composition Editor, do the
following:
- Open the IMultiCellCanvas* pop-up menu
from the row, then select Rows.
- In the submenu, select Add row after
or Add row before.
- To add a row from the Multi-Cell Canvas Layout
Prompter window, do the following:
- In the Row Attributes table, open
the pop-up menu for an adjacent row.
- In the menu, select Add row after
or Add row before.
- Removing a row
- You can remove a canvas row from either the Composition
Editor or the Multi-Cell Canvas Layout Prompter window.
- To remove a row from the Composition Editor, do
the following:
- Open the IMultiCellCanvas* pop-up menu
from the row, then select Rows.
- In the submenu, select Delete row.
- To remove a row from the Multi-Cell Canvas Layout
Prompter window, do the following:
- In the Row Attributes table, open
the pop-up menu for the row.
- In the menu, select Delete row.
- Adding a column
- You can add a column to the canvas from either the
Composition Editor or the Multi-Cell Canvas Layout
Prompter window.
- To add a column from the Composition Editor, do
the following:
- Open the IMultiCellCanvas* pop-up menu
from the column, then select Columns.
- In the submenu, select Add column
after or Add column before.
- To add a column from the Multi-Cell Canvas Layout
Prompter window, do the following:
- In the Column Attributes table,
open the pop-up menu for an adjacent
column.
- In the menu, select Add column after
or Add column before.
- Removing a column
- You can remove a canvas column from either the
Composition Editor or the Multi-Cell Canvas Layout
Prompter window.
- To remove a column from the Composition Editor,
do the following:
- Open the IMultiCellCanvas* pop-up menu
from the column, then select Columns.
- In the submenu, select Delete column.
- To remove a column from the Multi-Cell Canvas
Layout Prompter window, do the following:
- In the Column Attributes table,
open the pop-up menu for the column.
- In the menu, select Delete column.
- 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.
- To define row expandability from the Composition
Editor, do the following:
- Open the IMultiCellCanvas* pop-up menu
from the row, then select Rows.
- If the Expandable choice is
checked in the submenu, the row is
currently expandable. Otherwise, it is
not expandable. To change the row's
expandability, select Expandable.
- To define row expandability from the Multi-Cell
Canvas Layout Prompter window, do the following:
- In the Row Attributes table,
select the Expandable column for
the canvas row.
- To make the row expandable, select yes.
To make it not expandable, select either no
or default.
- To define column expandability from the
Composition Editor, do the following:
- Open the IMultiCellCanvas* pop-up menu
and select Columns.
- If the Expandable choice is
checked in the submenu, the column is
currently expandable. Otherwise, it is
not expandable. To change the column's
expandability, select Expandable.
- To define column expandability from the
Multi-Cell Canvas Layout Prompter window, do the
following:
- In the Column Attributes table,
select the Expandable column for
the canvas column.
- To make the column expandable, select yes.
To make it not expandable, select either no
or default.
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
IMultiCellCanvas
Property Settings --
IMultiCellCanvas
Portability --
IMultiCellCanvas