Menu

#212 getBackgroundColor doesn't work

v1.0_(example)
closed
Jon Iles
None
5
2017-10-06
2013-04-25
TecFun
No

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()
1 Attachments

Discussion

  • Jon Iles

    Jon Iles - 2017-10-06
    • status: open --> closed
    • assigned_to: Jon Iles
     
  • Jon Iles

    Jon Iles - 2017-10-06

    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.

     

Log in to post a comment.