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

Application.BoxStylesEditEx Method (Project)

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

Sets the style of boxes in the Network Diagram view, where colors can be hexadecimal values.

Syntax

expression. BoxStylesEditEx( ** Style, ** DataTemplate, ** HorizontalGridlines, ** VerticalGridlines, ** BorderShape, ** BorderColor, ** BorderWidth, ** BackgroundColor, ** BackgroundPattern** )

expression An expression that returns an Application object.

Parameters

NameRequired/OptionalData TypeDescription
StyleRequiredLongThe box style to change. Can be one of the PjBoxStyle constants.
DataTemplateOptionalStringThe name of the data template to use for the style.
HorizontalGridlinesOptionalBooleanTrue if horizontal gridlines separate each row in the box; otherwise, False.
VerticalGridlinesOptionalBooleanTrue if vertical gridlines separate each row in the box; otherwise, False.
BorderShapeOptionalLongThe shape of the box border. Can be one of the PjBoxShape constants.
BorderColorOptionalLongThe color of the box border. 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.
BorderWidthOptionalLongA value from 1 through 4 that specifies the width of the box border, in pixels.
BackgroundColorOptionalLongThe color of the box background. Can be a hexadecimal value for the RGB color.
BackgroundPatternOptionalLongThe pattern for the background. Can be one of the PjBackgroundPattern constants.

Return Value

Boolean

Remarks

To display the Box Styles dialog box, use the BarBoxStyles method.

Example

The following example changes boxes with the pjBoxCritical style to be shown as rounded rectangles, adds vertical gridlines, sets the border color to a dark red, and sets the background color to light gray with a dither pattern.

Sub BoxStyles_EditCritical() 
 'Activate the Network Diagram view 
 ViewApply Name:="Network Diagram" 

 BoxStylesEditEx Style:=pjBoxCritical, BorderShape:=pjBoxRoundedRectangle, VerticalGridlines:=True, _ 
 BorderColor:=&;HB0, BorderWidth:=3, _ 
 BackgroundColor:=&;HE0E0E0, BackgroundPattern:=pjBackgroundLightDither 
End Sub

Note If you use any of the PjColor enumeration constants for the BorderColor or BackgroundColor parameters, the color will be nearly black. For example, the value of pjGreen is 9, which in the BoxLinksEx method is a very dark red. To use only the sixteen colors available with PjColor constants, use theBoxStylesEdit method.

© 2018 Microsoft