Table of contents
TOC
Collapse the table of content
Expand the table of content

Application.BoxLayoutEx Method (Project)

office 365 dev account|Last Updated: 6/12/2017
|
1 Contributor

Specifies the layout of boxes in the active Network Diagram view (PERT chart), where the background color can be specified as a hexadecimal value.

Syntax

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

expression An expression that returns an Application object.

Parameters

NameRequired/OptionalData TypeDescription
LayoutModeOptionalLongSpecifies 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 PjLayoutMode constants.
LayoutSchemeOptionalLongSpecifies box alignment within each row. Can be one of the PjLayoutScheme constants.
SummaryPrecedenceOptionalBooleanIf True, summary tasks are placed before subtasks.
RowAlignmentOptionalLongAlignment of text within a row. Can be one of the PjVerticalAlignment constants.
ColumnAlignmentOptionalLongAlignment of text within a column. Can be one of the PjAlignment constants.
RowSpacingOptionalLongSpacing between rows. The value can be from 0 to 200.
ColumnSpacingOptionalLongSpacing between columns. The value can be from 0 to 200.
RowHeightOptionalLongThe height of each row of boxes. Can be one of the PjRowColSize constants.
ColumnWidthOptionalLongThe width of each column of boxes. Can be one of the PjRowColSize constants.
AdjustForPageBreaksOptionalBooleanIf True, a new task is placed on the next page if it does not fit on the current page. If False, a new task can fall on a break between pages.
ShowSummaryTasksOptionalBooleanIf True, summary tasks are shown. If False, summary tasks are hidden.
ViewBackgroundColorOptionalLongThe background color of the view. Can be a hexadecimal value for the RGB color, where red is the last byte. For example, the value &;HFF0000 is blue and &;H00FFFF is yellow.
ViewBackgroundPatternOptionalLongThe pattern used for the background. Can be one of the PjBackgroundPattern constants.
ShowProgressMarksOptionalBooleanTrue if tasks in progress are marked with a diagonal line from the upper-left corner of the box to the lower-right corner and completed tasks are marked with an additional diagonal line from the upper-right corner of the box to the lower-left corner. False if the progress of tasks is not marked.
ShowPageBreaksOptionalBooleanTrue if page breaks show in the Network Diagram; otherwise, False.
ShowIDOnlyOptionalBooleanTrue if only task ID numbers are displayed. False if all the task data fields in Network Diagram boxes are displayed.

Return Value

Boolean

Remarks

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

Example

The following example sets the layout of boxes on the active Network Diagram view to the default values.

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

Note If you use any of the PjColor constants for the ViewBackgroundColor parameter, the color will be nearly black. For example, the value of pjGreen is 9, which in the BoxLayoutEx method is a very dark red. To use only the sixteen colors available with PjColor constants, use the BoxLayout method.

© 2018 Microsoft