Question

I'm using a FormToolkit to create a Section.

Why doesn't the setTitleBarGradientBackground API have any effect on the coloring of the title bar?

Was it helpful?

Solution

There is a bug report here (Bug 213193). Unfortunately it doesn't look like you can expect this to be fixed any time soon...

Section#setTitleBarBackground is working now - sets the top color of the section background gradient like in RCP.

Section#setTitleBarGradientBackground sets a color (Section#COLOR_GBG) that is never used in Section class??!!

Section#setTitleBarBorderColor - has no effect.

OTHER TIPS

Inspecting Section source code shows, that the code is implemented in the following way:

/**
 * Sets the color of the title bar gradient background when TITLE_BAR style
 * is used. This color is used at the height where title controls end
 * (toggle, tool bar).
 * 
 * @param color
 *            the title bar gradient background
 */
public void setTitleBarGradientBackground(Color color) {
    putTitleBarColor(COLOR_GBG, color);
}

But if you take a look at Section#onPaint(PaintEvent e) you won't find any usage of COLOR_GBG.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top