BoxSet Method
Creates, selects, or moves a task on the Network Diagram.
Syntax
expression**.BoxSet(Action, TaskID, XPosition, YPosition, ProjectName)**
*expression * Optional. An expression that returns an Application object.
PjBoxSet
Constant | Description |
---|---|
pjBoxAddToSelection | Selects the task, retaining any existing selection. |
pjBoxCreate | Creates a new task, clearing any existing selection. |
pjBoxMoveAbsolute | Positions the task relative to the upper left corner of the view. If more than one task is selected and TaskID is not specified, all selected tasks are moved. If TaskID is specified, the selection is cleared and only that task is moved. |
pjBoxMoveRelative | Positions the task relative to its current position. If more than one task is selected and TaskID is not specified, all selected tasks are moved. If TaskID is specified, the selection is cleared and only that task is moved. |
pjBoxSelect | Selects the task, clearing any existing selection. |
pjBoxUnselect | Removes the task from the selection. If more than one task is selected and TaskID is not specified, the box with focus is removed from the selection. If TaskID is specified, only that task is removed from the selection. |
TaskID Optional Long. The identification number of the task. If Action is pjBoxCreate, TaskID is ignored.
XPosition Optional Long. The horizontal position of the task, in pixels. Required if Action is pjBoxMoveAbsolute or pjBoxMoveRelative. If Action is pjBoxCreate or pjBoxMoveAbsolute, XPosition is the absolute horizontal position of the upper left corner of the task. If Action is pjBoxMoveRelative, XPosition is the amount to move the task horizontally relative to the current position. If Action is pjBoxAddToSelection, pjBoxSelect, or pjBoxUnselect, XPosition is ignored.
YPosition Optional Long. The vertical position of the task, in pixels. Required if Action is pjBoxMoveAbsolute or pjBoxMoveRelative. If Action is pjBoxCreate or pjBoxMoveAbsolute, YPosition is the absolute vertical position of the upper left corner of the task. If Action is pjBoxMoveRelative, YPosition is the amount to move the task vertically relative to the current position. If Action is pjBoxAddToSelection, pjBoxSelect, or pjBoxUnselect, YPosition is ignored.
ProjectName Optional String. If the active project is a consolidated project, specifies the name of the project for the identification number specified by TaskID. If TaskID is not specified, ProjectName is ignored. The default value is the name of the active project.
Remarks
If only one task box is selected, specifying pjBoxUnselect has no effect.
If automatic layout as been activated for the Network Diagram view, XPosition and YPosition have no effect.
Applies to | Application Object
See Also | BoxAlign Method | BoxCellEdit Method | BoxCellLayout Method | BoxDataTemplate Method | BoxFormat Method | BoxGetXPosition Method | BoxGetYPosition Method | BoxStylesEdit Method