Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » view background color
view background color [message #465180] Sun, 25 March 2007 02:41 Go to next message
Eclipse UserFriend
Originally posted by: jelgolfnut.gmail.com

I have a view that contains a pagebook. One of the pages contains text
fields and labels. The text fields show up as white input fields but the
rest has the eclipse grey background. I've tried a couple of different
things to get the background to all be white, but no luck. I have a
default page that I want the default grey....any suggestions?
Re: view background color [message #465182 is a reply to message #465180] Sun, 25 March 2007 13:19 Go to previous message
Eclipse UserFriend
Originally posted by: a41m.e.klswlff.spamgourmet.com

JimL wrote:
> I have a view that contains a pagebook. One of the pages contains text
> fields and labels. The text fields show up as white input fields but
> the rest has the eclipse grey background. I've tried a couple of
> different things to get the background to all be white, but no luck. I
> have a default page that I want the default grey....any suggestions?
Maybe this code snippet from my PageBook will help:

public class MyPage extends Page {

/**
* Control of my page
*/

private Composite myControl;

public void createControl(Composite parent) {
myControl = new Composite(parent,SWT.NONE);
myControl.setBackground(
Display.getCurrent().
getSystemColor(SWT.COLOR_WHITE));

// Use a layout, which makes myControl extend over
// all of the visible area.
// As myControl is the only control in parent,
// the grid has only one columns.
GridLayout lo = new GridLayout(1,true);
parent.setLayout(lo);
// myControl will fill its cell horizontally and
// vertically (SWT.FILL,SWT.FILL)
// and the cell will grab all available
// horizontal and vertical space (true,true).
GridData gd = new GridData(SWT.FILL,SWT.FILL,
true,true);
myControl.setLayoutData(gd);

return myControl;
}
}

Klaus
Previous Topic:Access to PerspectiveBar?
Next Topic:error in editor sample
Goto Forum:
  


Current Time: Wed Sep 11 21:08:47 GMT 2024

Powered by FUDForum. Page generated in 0.02921 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top