Page 1 of 1

Gantt and Calendar

Posted: Wed Jan 31, 2007 9:48 pm
by 9241637
My users currently use the Gantt chart to communicate scheduling information in a Delphi (7) application. The information is provided through a scan of a data table that they can modify. Is it possible to use the TCalendar in a similar fashion so that they can more easily see the day of the week, etc.

Posted: Thu Feb 01, 2007 11:37 am
by narcis
Hi CAC,

Sorry but I don't understand what are you exactly trying to achieve. Could you please give us more detailed information?

Thanks in advance.

Posted: Thu Feb 01, 2007 1:46 pm
by 9241637
Sorry....

We do environemtnal projects that commonly involve the work of 2 or more entities (us, our clients, laboratories, etc.). We have developed a Delphi app that allows all of us to share all this data.

In this case we are cooperatively developing schedules. For instance our client may schedule sampling of wells during the first week of March, the lab may take a month to complete the analysis, and then we may take two weeks to evaluate the data and prepare a report. All of us can review/add/edit the schedule through the application.

Right now we do that on a Gantt chart, which is good, but I was hopeful that we could also present the same data (a bar for instance, or text) on a Calendar view so that days of the week, holidays, etc. are more obvious.

Hope this helps. Thanks again

Posted: Mon Feb 05, 2007 12:10 pm
by Pep
Hi,

it cannot be done directly, the only way to do this that I can think of would using similar code to the following one (drawing a rectangle setting custom colors and add some more text using the TextOut method) :

Code: Select all

Private Sub TChart1_OnBeforeDrawSeries() 
With TChart1 
.Canvas.Brush.Color = vbYellow 
.Canvas.Rectangle .Series(0).asCalendar.RectCell(2, 5).Left, _ 
.Series(0).asCalendar.RectCell(2, 5).Top, _ 
.Series(0).asCalendar.RectCell(2, 5).Right, _ 
.Series(0).asCalendar.RectCell(2, 5).Bottom 
.Canvas.TextOut .Series(0).asCalendar.RectCell(2, 5).Left + 5, .Series(0).asCalendar.RectCell(2, 5).Top + 1, "Text" 
End With 
End Sub