BoxFormat Method

Formats individual boxes in the Network Diagram.

Syntax

expression**.BoxFormat(ProjectName, TaskID, DataTemplate, HorizontalGridlines, VerticalGridlines, BorderShape, BorderColor, BorderWidth, BackgroundColor, BackgroundPattern, Reset)**

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

ProjectName    Optional String. The name of the project containing TaskID when working with consolidated projects. The default value is the name of the active project.

TaskID    Optional Long. The identification number of the task represented by the box to change. The default behavior is to change the box(es) representing the selected task(s).

DataTemplate    Optional String. The name of the data template to use.

HorizontalGridlines    Optional Boolean. True if horizontal gridlines separate each row in the box.

VerticalGridlines    Optional Boolean. True if vertical gridlines separate each row in the box.

PjBoxShape

pjBoxCapsule pjBoxRightParallelogram
pjBoxDownTrapezoid pjBoxRoundedRectangle
pjBoxLeftParallelogram pjBoxUpTrapezoid
pjBoxPointedEnds pjBoxWideRectangle
pjBoxRectangle pjBoxWideRoundedRectangle

PjColor

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

BorderWidth    Optional Long. A value from 1 through 4 that specifies the width of the box border, in pixels.

BackgroundColor    Optional Long. The color of the box background. Can be one of the PjColor constants.

PjBackgroundPattern

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

Reset    Optional Boolean. True if the box formatting is reset to the default style as shown in the Box Styles dialog box. If Reset is True, all arguments except ProjectName and TaskID are ignored.

Remarks

If TaskID is specified, the associated task cannot be hidden due to application of a filter or a collapsed outline structure.

Using the BoxFormat method without specifying any arguments displays the Format Box dialog box for the selected tasks. If no tasks are selected, the BoxFormat method has no effect.

Use the BoxFormat method to change the formatting of boxes from their default styles. To define the default styles, use the BoxStylesEdit method.

Applies to | Application Object

See Also | BarBoxFormat Method | BoxLayout Method | BoxStylesEdit Method