CTabFolder.setSelectionBackground

Specify a gradient of colours to be draw in the background of the selected tab. For example to draw a vertical 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}, true); </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.

@param vertical indicate the direction of the gradient. True is vertical and false is horizontal.

@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 setSelectionBackground(Color color)
  2. void setSelectionBackground(Color[] colors, int[] percents)
  3. void setSelectionBackground(Color[] colors, int[] percents, bool vertical)
    class CTabFolder
    void
    setSelectionBackground
    ()
  4. void setSelectionBackground(Image image)

Meta