Home Forums FlexGantt How to change colors for Selector windows

Viewing 1 reply thread
  • Author
    • bwalker2
      Post count: 1
      #13707 |

      We are incorporating the FlexGantt chart into a product with a color theme which does not work with the default colors of the selector (e.g. LayerSelector, OverviewSelector, etc.) windows. I see this color scheme is defined in the GradientBorder utility class, but I’m unsure of how of how to access that class to change the colors.

      What is the simplest/best way to change the colors used for all Selector windows?

    • Dirk Lemmermann
      Post count: 69
      #13709 |

      You can set a new border (which actually not only draws a border but also fills the background) by calling

      selector.getContentPane().setBorder(new MyBorder());

      You can get access to all selectors by providing your own selector factory. Do so by subclassing TimeGranularySelectorFactory. You can then override the createSelector() method, call super.createSelector(), and apply the code above on the selector created by the superclass.

      To make the Gantt Chart use your custom selector factory simply create a subclass of the Gantt chart control and override the getSelectorFactory() method.


Viewing 1 reply thread
  • You must be logged in to reply to this topic.