Skip to main content
Table of Contents

Common pitfalls

  • Use Name, not a Text property. A task's caption is Name; its long text is Description. Schedule fields are PlannedStart and PlannedDuration (a duration object with Value and DurationType), not StartTime/Duration.
  • Always pair BeginUpdate/EndUpdate. Bulk task or option changes outside an update block force a recalculation per change and can flicker. Use try…finally so EndUpdate always runs.
  • Build before you configure columns. Configure columns and timeline against a project that already has tasks, so auto-sizing and sorting have data to work with.
  • Durations and the decimal separator. Value is a Double. When loading locale-sensitive data (e.g. CSV authored with .), align FormatSettings.DecimalSeparator or fractional durations may parse wrong.
  • WorkTimePolicy migration. Older projects stored a UseWorkingHours boolean. A stored False now maps to whAllTime; opening such a file may raise an error you can safely ignore once you set the task's WorkTimePolicy explicitly.
  • Unscheduled tasks. A task with no PlannedStart is treated as unscheduled and only appears on the timeline when Appearance.Options.DrawUnscheduledTasks is enabled.
  • Filtering needs the predefined property names. AddAND, Parse, and Sort all use the identifiers taskname, progress, startdate, etc. — the same names used for columns. A typo silently matches nothing.
  • Sorting is a one-time operation. Project.Sort reorders the tasks once; it does not keep new or edited tasks sorted automatically. Re-sort after adding tasks if you need a stable order.
  • A shared project is owned by whoever created it. When you assign your own TTMSFNCGanttProject instance to several charts, manage its lifetime yourself; the internal default project is owned by the chart and should not be freed.
  • Export columns are separate from screen columns. TaskListColumns on the PDF/Print options does not inherit the on-screen task-list columns — configure the exported columns explicitly or the export shows none.

See also