getBackgroundColor doesn't work
Multi platform library to read and write schedule data
Brought to you by:
joniles
The "getBackgroundColor"-Function always returns "Black" ?!
int aCnt = aFile.getViews().size(); for (int i = 0; i < aCnt; i++) { Object aTmpGCV = aFile.getViews().get(i); GanttChartView aGCV = null; try { aGCV = (GanttChartView)aTmpGCV; ... if (aGCV.getType() == ViewType.GANTT_CHART) { var aList = aGCV.getTableFontStyles(); if (aList != null) foreach (TableFontStyle aStyle in aList) { ...aStyle.getBackgroundColor()
Apologies for the delay in replying. The reason that the background colour is always black is that the MPP12 file format does not allow you to set the background colour of a font. To correctly select the background colour you also need to take account of the backgroun pattern, which in this case is transparent, so no colour is shown. MPP14 files allow the background colour and pattern to be set and these should be read correctly by MPXJ.