Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » JFace » display images with tableviewer(display images with tableviewer by using ITableLabelProvider interface)
display images with tableviewer [message #1060077] Thu, 23 May 2013 01:09
chang jiaqiang is currently offline chang jiaqiangFriend
Messages: 3
Registered: May 2013
Junior Member
I need to display images on each column in the table with tableviewer,so I implements the interface ITableLabelProvider in which there is a method "public Image getColumnImage(Object arg0, int arg1){}" and this method can display images on each column,right? So I code like this
public Image getColumnImage(Object arg0, int arg1)
Image image = null;
image = new Image(null,10,20);//width=10
image = new Image(null,20,20);//width=20
image = new Image(null,30,20);//width=30
return image;
well, the problem is the image on the column 1 is good,but the images on the column 2 and 3 is not good, their size is the same as the column 1 image's size(width=10).
if I initialize the column 1 image with width 20(image = new Image(null,20,20)),all the images on the table is the same width.why? why can't the images have different size? if I wanna display images with different size,how can I do that?
Previous Topic:Drag and Drop into Table, how to get index?
Next Topic:tableviewer display control
Goto Forum:

Current Time: Mon Jun 18 12:00:41 GMT 2018

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

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

Back to the top