CTabFolder.setBackground

Specify a gradient of colours to be drawn in the background of the unselected tabs. For example to draw a gradient that varies from dark blue to blue and then to white, use the following call to setBackground: <pre> cfolder.setBackground(new Color[]{display.getSystemColor(SWT.COLOR_DARK_BLUE), display.getSystemColor(SWT.COLOR_BLUE), display.getSystemColor(SWT.COLOR_WHITE), display.getSystemColor(SWT.COLOR_WHITE)}, new int[] {25, 50, 100}); </pre>

@param colors an array of Color that specifies the colors to appear in the gradient in order of appearance left to right. The value <code>null</code> clears the background gradient. The value <code>null</code> can be used inside the array of Color to specify the background color. @param percents an array of integers between 0 and 100 specifying the percent of the width of the widget at which the color should change. The size of the percents array must be one less than the size of the colors array.

@exception SWTException <ul> <li>ERROR_THREAD_INVALID_ACCESS when called from the wrong thread</li> <li>ERROR_WIDGET_DISPOSED when the widget has been disposed</li> </ul>

@since 3.0

  1. void setBackground(Color[] colors, int[] percents)
    class CTabFolder
    void
    setBackground
  2. void setBackground(Color[] colors, int[] percents, bool vertical)
  3. void setBackground(Image image)

Meta