Skip to content

TTMSFNCGanttChart

Breaking Change Between v1.2.0 and v1.2.1

The Task property UseWorkingHours has been changed to WorkTimePolicy. By default this was set to True and this behavior remains unchanged with the new property. However, if UseWorkingHours was previously set to False, this setting was stored in the project file and will now cause an error when attempting to open the project. To resolve this issue, you can safely ignore the error and set the WorkTimePolicy property of the task to whAllTime to replicate the original behavior.

A Gantt chart is a project management tool assisting in the planning and scheduling the different tasks of projects. They are particularly useful for visualising projects. It helps to see the connection between the activities over time. And is a useful tool to track the progress.

When dropping a new instance of the TTMSFNCGanttChart on the form, the gantt chart is initialized with some sample data, this contains some tasks, a work time configuration and the default states.

TMSFNCGanttChart

Properties

Property name Description
Adapter Activates the adapter and displays the data from the dataset when the dataset is active.
Appearance The visual settings as different fill colors and strokes of the control.
BitmapContainer When true, automatically retrieves the fields from the dataset and creates series for each field. (Default True.)
Interaction Can be set to indicate on which row the headers are defined. (Default 0)
ItemPopupMenu The item popup is triggered when you right-click on an item in the timeline.
PopupMenu The popup is triggered when you right-click on the control.
Project The project with all of the information on the tasks, work time and states.
TaskListOptions Different settings for the task list control.
TimeLineOptions Different settings for the timeline.

Methods

Method name Description
BeginUpdate Blocks the full calculation cycle before setting multiple properties. Must be combined with EndUpdate. (This improves the performance of the control.)
EndUpdate Forces to calculate and update all of the settings after setting multiple properties. Must be called after a BeginUpdate. (This improves the performance of the control.)
GetNextTask(ATask: TTMSFNCGanttTask; ASameParent: Boolean = False) Retrieves the next task in the WBS order, with the parameter you can choose to stay within the same parent task.
GetNextVisibleTask(ATask: TTMSFNCGanttTask; ASameParent: Boolean = False) Retrieves the next task in the timeline, with the parameter you can choose to stay within the same parent task.
GetPreviousTask(ATask: TTMSFNCGanttTask; ASameParent: Boolean = False) Retrieves the previous task in the WBS order, with the parameter you can choose to stay within the same parent task.
GetPreviousVisibleTask(ATask: TTMSFNCGanttTask; ASameParent: Boolean = False) Retrieves the previous task in the timeline, with the parameter you can choose to stay within the same parent task.
GetRowByPoint(APoint: TPointF) Returns the index of the task based on a position.
GetRowByTask(ATask: TTMSFNCGanttTask) Returns the index of the given task.
GetRowByXY(AX: Single; AY: Single) Returns the index of the task based on a position.
GetSelectedRow Returns the index of the selected task.
GetTaskByRow(ARow: Integer) Returns the task of the given index.
GetTasksCount Gives the total number of tasks in the current project.
LoadTasksFromCSVData Load the tasks from a CSV File.
LoadTasksFromCSVStream Load the tasks from a CSV as a memory stream.
LoadTasksFromJSONFile Load the tasks from a JSON File.
LoadTasksFromJSONStream Load the tasks from a JSON memory stream.
SaveTasksToCSVData Save the tasks as a CSV File.
SaveTasksToJSONFile Save the tasks as a JOSN File.
SaveTasksToCSVStream Save the tasks as a JSON to a memory stream.
SelectNextTask(ASameParent: Boolean = False) Selects the next task in the WBS order, with the parameter you can choose to stay within the same parent task.
SelectNextVisibleTask(ASameParent: Boolean = False) Selects the next task in the timeline, with the parameter you can choose to stay within the same parent task.
SelectPreviousTask(ASameParent: Boolean = False) Selects the previous task in the WBS order, with the parameter you can choose to stay within the same parent task.
SelectPreviousVisibleTask(ASameParent: Boolean = False) Selects the previous task in the timeline, with the parameter you can choose to stay within the same parent task.
SelectTask(ATask: TTMSFNCGanttTask) Select a task in the task list and timeline.
SelectTaskByRow(ARow: Integer) Select a task based on the index in the timeline.
SetSampleData Fills the Project of the Gantt Chart with some sample tasks and settings.
ShowTaskEditor(ATask: TTMSFNCGanttTask) Executes the task editor for the requested task.
UpdateGanttChart Updates the gantt chart settings and appearance.

Events

Event name Description
OnAddGanttTaskListTask Event to choose whether to add the task to the list or not.
OnAfterAddGanttTaskListColumn Event to do additional actions after the column was added in the task list.
OnAfterDrawGanttTimeLineDependency Event to manipulate the dependency line after drawing.
OnAfterDrawGanttTimeLineDependencyArrow Event to manipulate the dependency arrow after drawing.
OnAfterDrawGanttTimeLineEventMarker Event to manipulate the timeline event marker after drawing.
OnAfterDrawGanttTimeLineGroupTime Event to manipulate the group time area after drawing.
OnAfterDrawGanttTimeLineGroupTimeText Event that is triggered after the group time text was drawn.
OnAfterDrawGanttTimeLineItem Event to manipulate the timeline item after drawing.
OnAfterDrawGanttTimeLineItemLeftGrip Event to manipulate the left grip in a timeline item after drawing.
OnAfterDrawGanttTimeLineItemProgress Event to manipulate the timeline item progress after drawing.
OnAfterDrawGanttTimeLineItemRightGrip Event to manipulate the right grip in a timeline item after drawing.
OnAfterDrawGanttTimeLineItemText Event that is triggered after the timeline item text was drawn.
OnAfterDrawGanttTimeLineTime Event that is triggered after the time text was drawn.
OnAfterMoveTimeLineTask Event to do additional after the move of the tasks.
OnAfterShowTaskPopup Event that is triggered after closing the item popup menu. (Not available in TMS WEB Core.)
OnAfterSizeTimeLineTask Event to do additional after setting the size of the tasks.
OnBeforeAddGanttTaskListColumn Event to configure the column in the task list.
OnBeforeDrawGanttTimeLineDependency Event to manipulate the drawing of the dependency line.
OnBeforeDrawGanttTimeLineDependencyArrow Event to manipulate the drawing of the dependency arrow.
OnBeforeDrawGanttTimeLineEventMarker Event to manipulate the drawing of the timeline event marker.
OnBeforeDrawGanttTimeLineGroupTime Event to manipulate the drawing of the group time area.
OnBeforeDrawGanttTimeLineGroupTimeText Event to manipulate the drawing of the group time text.
OnBeforeDrawGanttTimeLineItem Event to manipulate the drawing of the timeline items.
OnBeforeDrawGanttTimeLineItemLeftGrip Event to manipulate the drawing of the left grip in a timeline item.
OnBeforeDrawGanttTimeLineItemProgress Event to manipulate the drawing of the timeline item progress.
OnBeforeDrawGanttTimeLineItemRightGrip Event to manipulate the drawing of the right grip in a timeline item.
OnBeforeDrawGanttTimeLineItemText Event to manipulate the drawing of the timeline item text.
OnBeforeDrawGanttTimeLineTime Event to manipulate the drawing of the time area.
OnBeforeMoveTimeLineTask Event to manipulate the move action of the tasks.
OnBeforeShowTaskPopup Event that is triggered to configure the item popup menu before showing. (Not available in TMS WEB Core.)
OnBeforeSizeTimeLineTask Event to manipulate the size action of the tasks.
OnDrawStartSizeIndicator Event to choose to draw the sizing indicator at starttime.
OnDrawEndSizeIndicator Event to choose to draw the sizing indicator at endtime.
OnGanttTaskAdded
OnGanttTaskChanged Event that indicates when a task is changed.
OnGanttTaskListTaskAnchorClick Event to retrieve the anchor text that was clicked in the task list.
OnGanttTaskListTaskClick Event to retrieve the text and column of the task that was clicked in the task list.
OnGanttTaskSelected Event that is triggered after a task was selected.
OnGanttTimeLineItemClicked Event that is triggered when an item in the timeline is clicked.
OnGanttTimeLineItemDoubleClicked Event that is triggered when an item in the timeline is doubleclicked.
OnGanttProjectChanged
OnGetTaskHintText
OnSetGanttListTaskColumnText Event customize the text in the task list.
OnTaskEditorShow Event that is triggered when the task editor is shown.
OnTaskEditorClosed Event that is triggered when the default task editor is closed.

TTMSFNCGanttChartAppearance

The visual configuration of the control can be set with these properties.

GanttDark

Properties

Property name Description
DefaultItemAppearance The appearance that will be used when no other options or set. And when a task is created.
DefaultParentAppearance The appearance that will be used for tasks which have a subtask.
DependencyLine The settings for the line that is drawn when there is a relationship between tasks.
HeaderHeight The height of the task list and timeline header.
ItemHeight The height of the tasks.
Options Different settings for the drawing of the control.
SplitterAppearance The settings that are specific to the appearance of the splitter.
SplitterWidth The width of the splitter.
TaskListAppearance The settings that are specific to the appearance of the task list.
TaskListWidth The initial size of the task list.
TimeLineAppearance The settings that are specific to the appearance of the timeline.
UnscheduledItemAppearance The appearance that will be used when the task has no start date set.

TTMSFNCGanttChartAppearanceOptions

Some options to quickly change the visuals of the control.

Properties

Property name Description
DrawHoverItem Indicates whether the hovered item should be drawn.
DrawParentTasks Indicates if the parent tasks are shown in the timeline.
DrawSelectionGrip Indicates if the indicators on the side of the timeline item should be drawn when the task is selected.
DrawTaskName Indicates if the task name should be drawn in the timeline item.
DrawTasksByState Indicates if the task should be drawn based on the appearance set in the state.
DrawUnscheduledTasks Indicates whether to draw the tasks with no start date.
ShowProgress Indicates if the progress of the task is drawn.
UseDefaultAppearance Indicates to use the configured DefaultItemAppearance.
UseParentAppearance Indicates to use the configured DefaultParentAppearance.

TTMSFNCGanttChartInteraction

Settings for how the gantt chart items react on user interaction.

Properties

Property name Description
EnableMoveTasks Indicates whether it is possible for the user to move the task with mouse or keyboard. (Default True.)
EnableSizeTasks Indicates whether it is possible for the user to change the start or end date of the task with mouse or keyboard. (Default True.)
JumpToSelectedItemStartDate Indicates whether clicking on a row moves the timeline to show the item. (Default True.)
SelectItemOnRowClick Indicates whether clicking on a row selects it or not. (Default True.)
ShowEditorLockedProperty Indicates whether the task editor shows the property to lock or unlock a task. (Default True.)
ShowEditorOnF2Press Indicates whether the task editor is shown when F2-key is pressed. (Default True.)
ShowEditorOnDoubleClick Indicates whether the task editor is shown when a timeline item is double clicked. (Default True.)

TTMSFNCGanttProject

The TMS FNC Gantt Chart creates a default project by default. But it is possible to assign other TTMSFNCGanttProjects to the Gantt Chart. The project stores the different tasks, states and the work time.

TTMSFNCGanttTaskListOptions

Settings to configure the task list of the gantt chart.

Properties

Property name Description
Columns A collection of Columns that are shown in the task list.
DateFormat The date format that will be used for the start and end date in the task list.
IsVisible Indicates whether the task list is visible. (Default True.)
SizeableColumns Indicates whether it is possible to size the columns in the task list. (Default False.)

TTMSFNCGanttTaskListColumn

The configuration of the columns that are shown in the task list. You can set the name to some predefined values to retrieve specific properties from the tasks: wbs, taskname, taskdescription, startdate, enddate, duration, statename, progress, dependencies, datastring, datainteger,databoolean.

If you want to manipulate the text afterwards or want to fill a column with custom data, you can use the OnSetGanttListTaskColumnText event.

Properties

Property name Description
HeaderText The text that is shown in the header of the task list.
Name A Collection of Columns that are shown in the task list.
Tag Can be used as preferred, is not used in the internal code. (Default value is 0.)
Width The width of the column if no stretching is used.

TTMSFNCGanttTimeLineOptions

Settings to configure the timeline of the gantt chart.

Properties

Property name Description
IsVisible Indicates whether the timeline is visible. (Default True.)
GroupFormat The date format that will be used for the top tier.
GroupSpan The number of columns that need to be combined of the top tier. (Default 1.)
GroupUnit The unit of the top tier of the timeline. Can be hours, days, weeks, months or years. (Default gtuWeek.)
ShowGroup Indicates wether to top tier is drawn or not. (Default True.)
ShowTrackLine Indicates wether the current time line is drawn. (Default True.)
StartOfWeekDay The start date for if the unit is set to gtuWeek. (Default gdSunday;)
TimeLineFormat The date format that will be used for the timeline unit.
TimeLineSpan The number of columns that need to be combined of the timeline unit. (Default 1.)
TimeLineUnit The unit of the timeline. Can be hours, days, weeks, months or years. (Default gtuDay.)
ViewDateEnd When set the this will be the last date in the timeline. (Default 0, not used.)
ViewDateStart When set the this will be the first shown date in the timeline. (Default 0, not used.)