Is there a way to truncate any text in a mark that exceeds the length of a gantt segment.
I require to be able to put a fairly uniform amount of text within the mark, however, ofthen the gantt segment to which it relates will not be as wide as the text.
The width of each segment can vary within any series.
Therefore I wish to "crop off" the ends of the text that extend beyond the gantt segment
Any help would be appreciated.
using D2006 teechart 7 pro
Roy
Gantt and Marks
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Roy,
This could be done using OnGetSeriesMark event. There you know the mark index and its text so that you can use Canvas.TextWidth. Then you'd need each gantt bar width. There's not a direct way to get it but I'll send you an example which aligns the marks to the center, left or right of each gantt bar. You could use similar code for getting gantt bars width.
Hope this helps!
This could be done using OnGetSeriesMark event. There you know the mark index and its text so that you can use Canvas.TextWidth. Then you'd need each gantt bar width. There's not a direct way to get it but I'll send you an example which aligns the marks to the center, left or right of each gantt bar. You could use similar code for getting gantt bars width.
Hope this helps!
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
Hi Narcis,
Thanks for the reply and supplied sample. I think I can work from there.
However, your sample does not have a problem that I now have and which the Gantt demo in the Pro 7 Features Demo also has.
In your example the marks are contained within the chart area just like the Gantt.Pointers.
I am not able to achieve this, the pointers are contained but the marks extend left/right above/below the actual chart area.
Thanks again
Roy
Thanks for the reply and supplied sample. I think I can work from there.
However, your sample does not have a problem that I now have and which the Gantt demo in the Pro 7 Features Demo also has.
In your example the marks are contained within the chart area just like the Gantt.Pointers.
I am not able to achieve this, the pointers are contained but the marks extend left/right above/below the actual chart area.
Thanks again
Roy