Hello,
we have been reporting issues in TMS FNC Gantt Chart regularly since October 2025, since August 2026 alone in ten threads (Gantt Chart, FNC Core, VCL UI Pack), as a rule with a demo project, the exact source location and a suggested fix. You often react quickly, and we appreciate that. Still, some updates also brought new problems (FNC Core 4.5.0.1 together with the VCL UI Pack crashed on every SVG), and with 1.3.3.14 we again find errors in the basic functions of a Gantt chart: dependency lines disappear as soon as the user scrolls, a long bar runs away while it is moved with the mouse, and one point has been open since 14 August 2026, with our proposal from 21 August still unanswered.
These are not edge cases: scrolling through a schedule and moving a bar with the mouse is what every user of a Gantt chart does all day. Our next release is waiting for points 1 and 2, and for point 2 there is no workaround on our side. On our side this has meanwhile become a management issue. That is why we ask for clear answers at the end of this post.
The attached demo (GanttDragLines) reproduces everything below without any user input: it runs all tests after start and writes a log next to the exe; our run is included in the zip. The chart uses its default settings, only the dependency line colour is fuchsia so that the demo can count the line pixels. The bars are moved with WM_LBUTTONDOWN/WM_MOUSEMOVE/WM_LBUTTONUP sent to the timeline, which is the same VCL path as a real mouse; in our application the same happens with the real mouse. Versions: TMS FNC Gantt Chart 1.3.3.14, FNC Core 4.5.0.9, Delphi 13.1, VCL, Win64. Line numbers refer to the 1.3.3.14 sources.
1. Dependency lines are missing when one end lies outside the visible area
a) If the successor is not visible (below, above or right of the visible area), the line is not drawn at all, even where it runs through the visible area. Tests A2 (successor below the visible rows) and A3 (successor right of the visible days, lag of 40 working days): OnBeforeDrawGanttTimeLineDependency is not called, 0 line pixels. As far as we can see, the lines are drawn while the successor is drawn (TTMSFNCCustomGanttChart.DoOnBeforeDrawItem, DrawDependency in VCL.TMSFNCGanttChart.pas line 4847), and TTMSFNCCustomGanttTimeline.BuildDisplay only adds items whose rectangle intersects the content rect (VCL.TMSFNCGanttTimeline.pas line 7733).
b) If the predecessor lies above the top of the control, only the arrow at the successor is drawn. Test A1 (list scrolled down 4 rows): the event is called with StartPoint.Y = -52.5, and there are 0 line pixels between the top of the content and the successor. Test A1b (scrolled down only 1 row, StartPoint.Y = 37.5): 239 pixels. Test A0 (both visible): 221 pixels. In DrawDependency, the finish-to-start branch for a successor that does not start right of the predecessor (the usual case without lag) draws the vertical part and the rest only "if sp.Y > 0" (VCL.TMSFNCGanttChart.pas line 9059). The other branches have no such check.
Suggestion: draw the dependencies in a separate pass, for all dependencies whose line crosses the visible area, and leave the cutting to the clip rect instead of "sp.Y > 0".
2. A long bar runs away while it is moved with the mouse
Test B1: a bar of 60 days whose end is right of the visible days, moved in 6 steps of one day to the right. After step 1 the bar is correct, but the timeline scrolls to the end of the bar (scroll position 0 → 927), so the mouse is now over Sat 19 Dec instead of Thu 12 Nov. In step 2 the bar jumps by 37 days, in step 3 by another 38, until the end of the time range. Result: the mouse moved 6 days, the task 78 days. Test B2 (start left of the visible days, 3 steps to the left): mouse −3 days, task −10 days, and the view jumps back and forth. Test B0 (short bar, control): correct, the view does not scroll.
As far as we can see, at the end of TTMSFNCCustomGanttTimeline.HandleItemMouseInteraction (VCL.TMSFNCGanttTimeline.pas lines 18262–18265) Navigate(cls)/Navigate(cle) scrolls to the start or end of the bar after every step, and HandleMouseMove (line 8133, FSizeCell := cl) then uses the cell under the mouse in the scrolled view as the base for the next step.
Suggestion: navigate to the cell under the mouse, or scroll only when the mouse reaches the edge of the view. If you prefer not to change the default behaviour, an opt-in property would be fine for us.
3. The bar still runs ahead of the mouse across weekends (item 2 of TTMSFNCGanttChart 1.3.3.6: resizing a task corrupts PlannedDuration (whWorkDaysOnly) , open since 14 August 2026)
We reported this on 14 August 2026. On 18 August you answered that it needs more investigation, because a change could break existing applications. On 21 August we explained why it matters for construction schedules (after about eight weeks of dragging the offset is more than two weeks) and suggested an opt-in property that keeps the current behaviour as the default, so existing applications are not affected. That post has not been answered, and the code is unchanged in 1.3.3.14.
Test C: 3 working days, whWorkDaysOnly, Mon–Fri, 10 steps of one day to the right. Until the first weekend the bar follows the mouse, and when its start falls on a Sunday it correctly moves to Monday. From then on the bar is ahead of the mouse: 1 day in step 6, 2 days in steps 7 to 9, 4 calendar days after the second weekend. Result: the mouse moved 10 days, the task 14 days. TTMSFNCCustomGanttChart.DoOnBeforeMoveItem (VCL.TMSFNCGanttChart.pas lines 5057/5063) shifts the start with ShiftTimeNext/ShiftTimePrevious, and the next step adds the mouse movement to that shifted start. The commented-out mouseTime lines (5040–5049) look like the right idea.
Suggestion: compute the new start from the cell under the mouse at button down plus the total mouse movement, so the grab offset stays constant, behind an opt-in property as proposed in 27206. We would appreciate a decision on this point.
4. OnBeforeDrawGanttListNodeText: ADrawingParams.Exporting is not set
Test D: 5 paints of the task list on screen give 150 calls, Exporting = True in all 150. In TTMSFNCCustomGanttChart.DoOnTaskListBeforeDrawNodeText (VCL.TMSFNCGanttChart.pas line 5345 ff.) the field Exporting of the local record is never assigned, unlike in the other task list events (dp.Exporting := False in lines 5279, 5295, 5322 and 5339), so its value is whatever is on the stack.
Suggestion: dp.Exporting := False; there as well.
5. Access violations when the chart uses its default project (Project not assigned)
Some methods of TTMSFNCCustomGanttChart read the field FProject, which is nil when no project is assigned, instead of the property Project, which returns FDefaultProject in that case. This affects a chart created at runtime; a chart placed on a form at design time is not affected as far as we can see, because the form file stores Project = DefaultProject. All three cases raise an EAccessViolation in the demo (call stacks from the debugger):
- E1, Project := nil after an own project was assigned: SetProject → AssignInternalProjectEvents → "if Assigned(Project) then FProject.RegisterNotifyOwner(Self)" (VCL.TMSFNCGanttChart.pas lines 3413–3415). Project is never nil there, FProject is.
- E2, moving a whWorkDaysOnly bar by one day: DoOnBeforeMoveItem → ShiftTimeNext → WorkDaysCheck → FProject.WorkTime (lines 7699–7703; also line 7740 for whWorkTimeAndDays, and ShiftTimePrevious lines 7770–7774).
- E3, clicking the header of a sortable column (SortMethod gtsNormal): TTMSFNCCustomGanttList.HandleMouseUp → OnCustomColumnSort → DoOnCustomColumnSort → FProject.Sort (line 5187). The tasks stay unsorted.
Suggestion: use Project in these places; in AssignInternalProjectEvents check Assigned(FProject), since the default project registers itself in CreateDefaultProject. The FMX unit has the same lines. Our application assigns a project, so point 5 does not affect us; we ran into it while building the demo.
What we ask for
- Please confirm each of the five points.
- Please tell us in which version points 1 and 2 will be fixed, and let us know your decision on point 3.
- The attached demo needs no user input and logs every case together with the expected values. Feel free to use it as a regression test; we would be glad if it helped to catch such cases before a release.
Thank you for looking into this.
GanttDragLines_1.3.3.14.zip (13.1 KB)