BoxLayout Method

Specifies the layout of boxes in the active Network Diagram.

Syntax

expression**.BoxLayout(LayoutMode, LayoutScheme, SummaryPrecedence, RowAlignment, ColumnAlignment, RowSpacing, ColumnSpacing, RowHeight, ColumnWidth, AdjustForPageBreaks, ShowSummaryTasks, ViewBackgroundColor, ViewBackgroundPattern, ShowProgressMarks, ShowPageBreaks, ShowIDOnly)**

*expression   * Optional. An expression that returns an Application object.

LayoutMode    Optional Long. Specifies whether the layout of boxes is controlled automatically or by the user, either with the LayoutNow method or through the interface. Can be one of the following PjLayoutMode constants: pjLayoutAutomatic or pjLayoutManual.

LayoutScheme    Optional Long. The positioning scheme to use when arranging boxes. Can be one of the following PjLayoutScheme constants: pjLayoutTopDownFromLeft, pjLayoutTopDownByDay, pjLayoutTopDownByWeek, pjLayoutTopDownByMonth, pjLayoutTopDownCriticalFirst, pjLayoutCenteredFromLeft, or pjLayoutCenteredFromTop.

SummaryPrecedence    Optional Boolean. True if positioning a task in relation to its summary takes precedence over positioning it in relation to its predecessors. False if task links always take precedence when arranging boxes.

RowAlignment    Optional Long. Specifies box alignment within each row. Can be one of the following PjVerticalAlignment constants: pjTop, pjMiddle, or pjBottom.

ColumnAlignment    Optional Long. Specifies box alignment within each column. Can be one of the following PjAlignment constants: pjLeft, pjCenter, or pjRight.

RowSpacing    Optional Integer. A value from 0 through 200 that specifies the vertical distance between rows of boxes. At a zoom setting of 100%, the number of non-scaleable units specified with RowSpacing is equivalent to an equal number of pixels.

ColumnSpacing    Optional Integer. A value from 0 through 200 that specifies the horizontal distance between columns of boxes. At a zoom setting of 100%, the number of non-scaleable units specified with ColumnSpacing is equivalent to an equal number of pixels.

RowHeight    Optional Long. The height of each row of boxes. Can be one of the following PjRowColSize constants: pjSizeBestFit or pjSizeFixed.

ColumnWidth    Optional Long. The width of each column of boxes. Can be one of the following PjRowColSize constants: pjSizeBestFit or pjSizeFixed.

AdjustForPageBreaks    Optional Boolean. True if boxes are adjusted around page breaks when printing.

ShowSummaryTasks    Optional Boolean. True if summary tasks display on the Network Diagram.

PjColor

pjColorAutomatic pjNavy
pjAqua pjOlive
pjBlack pjPurple
pjBlue pjRed
pjFuchsia pjSilver
pjGray pjTeal
pjGreen pjYellow
pjLime pjWhite
pjMaroon  

PjBackgroundPattern

pjBackgroundDarkDiagonalLeft pjBackgroundLightDither
pjBackgroundDarkDiagonalRight pjBackgroundLightFill
pjBackgroundDarkDither pjBackgroundMediumDither
pjBackgroundDarkFill pjBackgroundMediumFill
pjBackgroundDiagonalLeft pjBackgroundMediumVerticalStripe
pjBackgroundDiagonalRight pjBackgroundSolidFill
pjBackgroundHollow pjBackgroundThinVerticalStripe

ShowProgressMarks    Optional Boolean. True if tasks in progress are marked with a diagonal line from the upper-left corner of the box to the lower-right and completed tasks are marked with an additional diagonal line from the upper-right corner of the box to the lower-left. False if the progress of tasks is not marked.

ShowPageBreaks    Optional Boolean. True if page breaks display in the Network Diagram.

ShowIDOnly    Optional Boolean. True if only task ID numbers are displayed. False if all the task data fields in Network Diagram boxes are displayed.

Remarks

Using the BoxLayout method without specifying any arguments displays the Box Layout dialog box.

Example

This example returns the layout of boxes on the active Network Diagram to the default settings.

Sub ReturnToDefault()
    Application.BoxLayout LayoutMode:=pjLayoutManual, LayoutScheme:=pjLayoutTopDownFromLeft, _
        SummaryPrecedence:=False, RowAlignment:=pjCenter, ColumnAlignment:=pjMiddle, RowSpacing:=45, _
            ColumnSpacing:=60, RowHeight:=pjSizeBestFit, ColumnWidth:=pjSizeBestFit, AdjustForPageBreaks:=True, _
                ShowSummaryTasks:=True, ViewBackgroundColor:=pjWhite, ViewBackgroundPattern:=pjBackgroundSolidFill, _
                    ShowProgressMarks:=False, ShowPageBreaks:=True, ShowIDOnly:=False
End Sub

Applies to | Application Object

See Also | BoxAlign Method | BoxCellLayout Method | BoxFormat Method | BoxLinks Method | BoxStylesEdit Method | LayoutSelectionNow Method