Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Nebula » Nebula ViewerCell with custom image
Nebula ViewerCell with custom image [message #591503] Wed, 06 August 2008 12:28
Johnny is currently offline JohnnyFriend
Messages: 1
Registered: July 2009
Junior Member

I'm trying to print an image to a cell in the nebula grid.
I've tried two ways without success. Or maybe there is another way??

Using the method ViewerCell.setImage(Image)
My problem here is that the image will not cover the whole cell,
the cell always puts a block of white space to the left of the image
(I have tried with bigger width than the cell has with the same result)

Example code:
GridViewerColumn col = new GridViewerColumn(viewer, SWT.NONE);
col.setLabelProvider(new CellLabelProvider() {

public void update(ViewerCell cell) {
cell.setImage(new Image(Display.getDefault(), imageData));

Using the GC to instead of setImage in the code below
GC gc = new GC(viewer.getGrid());
gc.setBackground(Display.getDefault().getSystemColor(SWT.COL OR_BLUE));
This will flash the color once and then replace it with the original table

Previous Topic:How to traverse through PGroup without focusing toggle button
Next Topic:Nebula ViewerCell with custom image
Goto Forum:

Current Time: Fri Jun 22 05:48:28 GMT 2018

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

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

Back to the top