XamGantt("Identifier").ExpandTaskCell "{0}[TaskName]"
This topic provides information about the xamGantt™ control’s testable user recordable methods.
This topic contains the following sections:
The following table briefly explains the various recordable methods for testing the control. Detailed information about the methods follows the table.
This method allows expanding the project task with a mouse click on the task’s expansion indicator, located in the grid cell, which contains child tasks.
The following table explains the method’s parameter followed by code example.
Expanding the first task to show its child tasks if the children exist are not showing.
XamGantt("Identifier").ExpandTaskCell "{0}[TaskName]"
The cell, in index [{0}], is the wrong column type to expand.
This method allows collapsing the project task with a mouse click on the task’s expansion indicator, located in the grid cell, which displays the child task’s expanded content.
The following table explains the method’s parameter followed by code example.
Collapsing the first task that has its child tasks expanded.
XamGantt("Identifier").CollapseTaskCell "{0}[TaskName]"
The following list contains the possible exceptions to the method and the likely reason causing them.
The cell, in index [{0}], is the wrong column type to expand
The specified task expansion indicator for cell [{1}] is not visible
This method allows moving the task to another time cell. With mouse dragging from the center of a timeline project task, which triggers the TaskBarDragCompleted event, moving the whole task will change the date of the scheduled task.
The the following flags can be applied to the moving tasks:
StartOnly – Represents a task with only a start time setting
FinishOnly – Represents a task with only a finished time setting
Milestone – Defined with True or False value indicates that the task is set as a special project
The following table explains the method’s parameter followed by code example.
Moves the task named “Planning” to date 9/14/2012 8:00AM.
XamGantt("Identifier"). MoveTask "Planning”, #9/14/2012 8:00AM#
Moves the third (index=2) visible task to date 9/14/2012 8:00AM.
XamGantt("Identifier"). MoveTask 2, #9/14/2012 8:00AM#
The following list contains the possible exceptions to the method and the likely reason causing them.
The specified project task index [{1}] is out of range
Cannot find the following project task [{1}]
The xamGantt’s project is read-only
The project milestone cannot be dragged
The project task cannot be dragged
This method allows changing the task’s size by increasing or decreasing, using the mouse to drag the timeline project task’s end, which triggers the TaskBarDragCompleted event, only moving the end of the task. In turn changes the task’s duration.
The following table explains the method’s parameter followed by code example.
Resizes the task named “Planning” to a final date of 9/14/2012 8:00AM.
XamGantt("Identifier"). ResizeTask "Planning”, #9/14/2012 8:00AM#
Resizes the task named “Planning” to 3-day duration.
XamGantt("Identifier").ResizeTask “Planning”, “3 days”
Resizes the task named “Planning” to a size of 200% more than its current length.
XamGantt("Identifier").ResizeTask “Planning”, 200
The following table lists the possible exceptions to the method and the likely reason causing them.
The specified project task index [{1}] is out of range
Cannot find the following project task [{1}]
The xamGantt’s project is read-only
Cannot drag the project task resize endpoint
The supplied argument [{0}] is not one of the expected type(s): String duration (such as 1 day or 8 hours, etc.), Decimal percent value, or DateTime such as 05/01/2012 9:00AM
This method allows setting the task as completed through percent, using the mouse to drag the end of a timeline project task, triggering the TaskBarDragCompleted event, which only moves the end of the task.
The following table explains the method’s parameter followed by code example.
Sets the task named “Planning” to a completed through date of 9/14/2012 8:00AM.
XamGantt("Identifier").SetTaskPercent "Planning”, #9/14/2012 8:00AM#
Sets task named “Planning” to a completed through of a total of 3 days.
XamGantt("Identifier"). SetTaskPercent “Planning”, “3 days”
Sets the task named “Planning” to a 50%percent complete.
XamGantt("Identifier"). SetTaskPercent “Planning”, 50
The following list contains the possible exceptions to the method and the likely reason causing them.
The specified project task index [{1}] is out of range
Cannot find the following project task [{1}]
The xamGantt’s project is read-only
Cannot drag the task percent
The supplied argument [{0}] is not one of the expected type(s): String duration (such as 1 day or 8 hours, etc.), Decimal percent value, or DateTime such as 05/01/2012 9:00AM
This method allows moving the task’s deadline to the supplied date, using the mouse to drag a timeline from its center, triggering the TaskBarDragCompleted event, which moves the task’s deadline.
The following table explains the method’s parameter followed by code example.
Setting the deadline of the task named “Planning” to date of 9/14/2012 8:00AM.
XamGantt("Identifier").SetTaskDeadline "Planning”, #9/14/2012 8:00AM#
Setting the deadline of the third visible task to date 9/14/2012 8:00AM.
XamGantt("Identifier"). SetTaskDeadline 2, #9/14/2012 8:00AM#
The following list contains the possible exceptions to the method and the likely reason causing them.
The specified project task index [{1}] is out of range
Cannot find the following project task [{1}]
The xamGantt’s project is read-only
Cannot drag the project milestone
Cannot drag the project task
This method allows setting the task’s splitter e in grid view, using the mouse to drag the splitter positioned between the grid and timeline. This triggers the DragCompleted event on the splitter thumb element.
The following table explains the method’s parameter followed by a code example.
Moves the splitter to set the view’s grid side to a width of 300 pixels.
XamGantt("Identifier").SetSplitter 300
None (outside of invalid or excluded parameters thrown by UFT).
This method deletes the selected tasks. On PreviewKeyDown event when mapping a key to the DeleteTask command, executes the Delete
key operation, and in turn, the xamGantt processes it as a valid task deletion time.
None
Deleting the selected tasks.
XamGantt("Identifier").DeleteSelectedTasks
N/A
The following topics provide additional information related to this topic.