10350 : Different colors on days

Question

with the ActiveX version of the control hosted on a web page, is it possible through script to block out specific days on the gantt chart like making weekends a different color? If so, how.

Answer

If you embed the ocx on a web page you can choose to write VB- or JScript on that page that will access the Gantt on the client side. Since the access to win32 functions are often very restricted on the client side you will have a hard time accessing drawing functionality that is needed to use the Back- and Foreground events.

A better solution is to produce your own ActiveX that uses the phGantTimePackage and put all the extra drawing stuff in that ActiveX, the user will then accept your control for download or not.

To hide certain days from view your can simply call IphGantX3.SetHiddenHour and IphGantX3.SetHiddenDayType from VBScript or JScript.

Leave a Reply