Making the background of Gantt Sheet transparent

Article ID: 2395
Last updated: 29 May, 2018
Article ID: 2395
Last updated: 29 May, 2018
Revision: 3
Views: 561
Posted: 23 Mar, 2011
by Dean J.
Updated: 29 May, 2018
by Gargani A.

Question

How to make the background of GanttSheet transparent?

Answer

There are several components that need to be configured to achieve this:

// Transparent background color:

Color bg = new Color( 0,0,0,0 );

// On the IlvChart:

ganttChart.setBackground( bg );

ganttChart.setOpaque( false );

// On the IlvManagerView:

ganttChart.getGanttSheet().setDoubleBuffering(false);

ganttChart.getGanttSheet().setBackground(bg);

// On the IlvJManagerViewPanel:

((JComponent)ganttChart.getGanttSheet().getParent()).setOpaque(false);

// On the IlvHierarchyChart$Splitter

((JComponent)ganttChart.getGanttSheet().getParent().getParent().getParent()).setOpaque(false);

// Remove the default weekend grid:

ganttFront.getGanttSheet().setVerticalGrid(new IlvVerticalGanttGrid());

// On the horizontal and vertical grid:

ganttFront.getGanttSheet().getHorizontalGrid().setForeground(bg);

ganttFront.getGanttSheet().getVerticalGrid().setForeground(bg);

This article was:   Helpful | Not helpful
Report an issue
Article ID: 2395
Last updated: 29 May, 2018
Revision: 3
Views: 561
Posted: 23 Mar, 2011 by Dean J.
Updated: 29 May, 2018 by Gargani A.
Also listed in


Others in this category