Skip to content

Latest commit

 

History

History
72 lines (47 loc) · 3.29 KB

Project.Application.DetailStylesFormatEx.md

File metadata and controls

72 lines (47 loc) · 3.29 KB
title keywords f1_keywords ms.service api_name ms.assetid ms.date ms.localizationpriority
Application.DetailStylesFormatEx method (Project)
vbapj.chm2164
vbapj.chm2164
project-server
Project.Application.DetailStylesFormatEx
3e460e76-ff7b-f07b-058c-1e37c53e453e
06/08/2017
medium

Application.DetailStylesFormatEx method (Project)

Sets the format of timescaled data fields in a Resource Usage view or Task Usage view, where colors can be hexadecimal values.

Syntax

expression. DetailStylesFormatEx( _Item_, _Font_, _Size_, _Bold_, _Italic_, _Underline_, _Color_, _CellColor_, _Pattern_, _ShowInMenu_, _Strikethrough_ )

expression An expression that returns an Application object.

Parameters

Name Required/Optional Data type Description
Item Optional Long The timescaled data field to format. If the active view is the Task Usage view, the value can be one of the PjTaskTimescaledData constants. If the active view is the Resource Usage view, the value can be one of the PjResourceTimescaledData constants.
Font Optional String The name of the font.
Size Optional Integer The size of the font in points.
Bold Optional Boolean True if the font is bold; otherwise, False.
Italic Optional Boolean True if the font is italic; otherwise, False.
Underline Optional Boolean True if the font is underlined; otherwise, False.
Color Optional Long The color of the font. Can be a hexadecimal value, where red is the last byte. For example, the value &HFF0000 is blue and &H00FFFF is yellow.
CellColor Optional Long The color of the cell background. Can be a hexadecimal value, where red is the last byte. For example, the value &HFF00 is green.
Pattern Optional Long The pattern for nonworking times. Can be one of the PjFillPattern constants.
ShowInMenu Optional Boolean True if the field specified with Item appears in the shortcut menu; otherwise, False. The default value is False.
Strikethrough Optional Variant True if the font is the strikethrough style.

Return value

Boolean

Remarks

Using the DetailStylesFormat method without specifying any arguments displays the Detail Styles dialog box with the Usage Details tab selected.

Example

The following example makes overallocations stand out from other information in a usage view.

Sub HighlightOverallocations() 
    DetailStylesAdd pjOverallocation 
    DetailStylesFormatEx Item:=pjOverallocation, Font:="Arial", Size:=10, _ 
        Bold:=True, Color:=&HA0, CellColor:=&HFFB0B0, Pattern:=pjSolidFill 
End Sub

Note

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

[!includeSupport and feedback]