Table of contents
TOC
折叠目录
展开目录

Application.GridlinesEdit 方法 (项目)Application.GridlinesEdit Method (Project)

office 365 dev account|上次更新日期: 2018/3/13
|
2 参与人员

编辑网格。Edits gridlines.

语法Syntax

表达式GridlinesEdit(* * NormalType,* * NormalColor,* 间隔 * IntervalType,* * IntervalColor ** )expression. **GridlinesEdit( ** Item, ** NormalType, ** NormalColor, ** Interval, ** IntervalType, ** IntervalColor )

表达式_一个表示应用程序对象的变量。_expression A variable that represents an Application object.

参数Parameters

名称Name必需/可选Required/Optional数据类型Data Type说明Description
ItemItem必需RequiredIntegerInteger要编辑的网格。可以是下面的PjGridline常量之一:The gridline to edit. Can be one of the following PjGridline constants:

  • 如果甘特图为活动: pjBarRowspjGanttCurrentDatepjGanttPageBreakspjGanttProjectFinishpjGanttProjectStartpjGanttRowspjGanttSheetColumnspjGanttSheetRowspjGanttStatusDatepjGanttTitleHorizontalpjGanttTitleVerticalpjMajorColumnspjMinorColumnsIf the Gantt Chart is active: pjBarRows , pjGanttCurrentDate , pjGanttPageBreaks , pjGanttProjectFinish , pjGanttProjectStart , pjGanttRows , pjGanttSheetColumns , pjGanttSheetRows , pjGanttStatusDate , pjGanttTitleHorizontal , pjGanttTitleVertical , pjMajorColumns , or pjMinorColumns .

  • 如果日历视图处于活动状态: pjCalendarDayspjCalendarWeekspjTitleHorizontalpjTitleVerticalpjDateBoxToppjDateBoxBottomIf the Calendar view is active: pjCalendarDays , pjCalendarWeeks , pjTitleHorizontal , pjTitleVertical , pjDateBoxTop , or pjDateBoxBottom .

  • 如果资源图表是活动的: pjMajorVerticalpjMinorVerticalpjHorizontalpjGraphCurrentDatepjGraphTitleHorizontalpjGraphTitleVerticalpjGraphProjectStartpjGraphProjectFinish ,或pjGraphStatusDateIf the Resource Graph is active: pjMajorVertical , pjMinorVertical , pjHorizontal , pjGraphCurrentDate , pjGraphTitleHorizontal , pjGraphTitleVertical , pjGraphProjectStart , pjGraphProjectFinish , or pjGraphStatusDate .

  • 如果任务工作表或资源工作表处于活动状态: pjSheetColumnspjSheetRowspjSheetTitleHorizontalpjSheetTitleVerticalpjSheetPageBreaksIf the Task Sheet or Resource Sheet is active: pjSheetColumns , pjSheetRows , pjSheetTitleHorizontal , pjSheetTitleVertical , or pjSheetPageBreaks .

  • 如果任务分配状况或资源使用状况视图处于活动状态: pjUsageColumnspjUsageRowspjUsageSheetRowspjUsageSheetColumnspjUsageTitleHorizontalpjUsageTitleVerticalpjUsagePageBreaksIf the Task Usage or Resource Usage view is active: pjUsageColumns , pjUsageRows , pjUsageSheetRows , pjUsageSheetColumns , pjUsageTitleHorizontal , pjUsageTitleVertical , or pjUsagePageBreaks .

| |NormalType|可选 |整数|普通网格的类型。可以是下列的PjLineType常量之一: pjNoLinespjContinuouspjCloseDotpjDotpjDash。 ||NormalColor|可选 |整数|普通网格的颜色。可以是PjColor常量之一。 ||间隔|可选 |整数|从 0 到 99 的数字,指定网格线之间的间隔。 ||IntervalType|可选 |整数|第二级网格的类型。可以是PjLineType常量之一。 ||IntervalColor|可选 |整数|第二级网格的颜色。可以是PjColor常量之一。 || | NormalType|Optional|Integer| The type for normal gridlines. Can be one of the following PjLineType constants: pjNoLines, pjContinuous, pjCloseDot, pjDot, or pjDash.| | NormalColor|Optional|Integer|The color of normal gridlines. Can be one of the PjColor constants.| | Interval|Optional|Integer|A number from 0 to 99 that specifies the interval between gridlines.| | IntervalType|Optional|Integer|The type for secondary gridlines. Can be one of the PjLineType constants.| | IntervalColor|Optional|Integer|The color of secondary gridlines. Can be one of the PjColor constants.|

返回值Return Value

BooleanBoolean

注解Remarks

要编辑网格线的颜色可以十六进制 RGB 值,请使用GridLinesEditEx方法。To edit gridlines where colors can be hexadecimal RGB values, use the GridLinesEditEx method.

示例Example

下面的示例将主要网格线的颜色更改为红色。The following example changes the major gridlines to red.

Sub Gridlines_Edit()    
    'Activate Gantt Chart view 
    ViewApply Name:="&;Gantt Chart" 
    GridlinesEdit Item:=pjMajorColumns, NormalColor:=pjRed 
End Sub
© 2018 Microsoft