Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » NatTable » Adding image to the column cell in nat table(Adding image to the column cell in nat table)
icon5.gif  Adding image to the column cell in nat table [message #1069128] Mon, 15 July 2013 08:02 Go to next message
Kondal Kolipaka is currently offline Kondal KolipakaFriend
Messages: 9
Registered: July 2009
Junior Member
Hello Experts,

Could you guys give some pointers on how to add image to the column cell.

Single column cell should look like below:
[checkbox image][windows8 image][Windows 8]

I am unable to attach screenshot for that, so representing column cell like below.

Is there anything called 'image provider' to cell in Nat table , like the way we do it in Tree viewer label provider.

Thanks,
KK
Re: Adding image to the column cell in nat table [message #1069132 is a reply to message #1069128] Mon, 15 July 2013 08:13 Go to previous messageGo to next message
Dirk Fauth is currently offline Dirk FauthFriend
Messages: 2902
Registered: July 2012
Senior Member
No there are no providers in NatTable like for JFace viewers.

We use special painters in cells. Have a look here: http://eclipse.org/nattable/documentation.php?page=styling
Re: Adding image to the column cell in nat table [message #1069210 is a reply to message #1069132] Mon, 15 July 2013 12:23 Go to previous messageGo to next message
Kondal Kolipaka is currently offline Kondal KolipakaFriend
Messages: 9
Registered: July 2009
Junior Member
Thanks Dirk,link was helpful.
Could you please help out in writing a cell painter displaying 3 elements(first one is checkbox painter, next is image painter,then followed by Text painter) in single column cell.

Thanks a lot.
-KK
Re: Adding image to the column cell in nat table [message #1069221 is a reply to message #1069210] Mon, 15 July 2013 12:48 Go to previous messageGo to next message
Dirk Fauth is currently offline Dirk FauthFriend
Messages: 2902
Registered: July 2012
Senior Member
Use a TextPainter, decorate it (CellPainterDecorator) with an ImagePainter, use the resulting painter as base painter of another decorator and decorate it with a CheckboxPainter
Re: Adding image to the column cell in nat table [message #1069244 is a reply to message #1069210] Mon, 15 July 2013 13:53 Go to previous message
Kondal Kolipaka is currently offline Kondal KolipakaFriend
Messages: 9
Registered: July 2009
Junior Member
Thanks a lot. It worked out.

-Kondal

[Updated on: Mon, 15 July 2013 13:56]

Report message to a moderator

Previous Topic:clear filter with tree grid
Next Topic:Editing and RowSpans
Goto Forum:
  


Current Time: Thu Apr 25 01:09:35 GMT 2024

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

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

Back to the top