Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Nebula » GridTableViewer, go to line with "\n" ?
GridTableViewer, go to line with "\n" ? [message #1297244] Tue, 15 April 2014 14:30 Go to next message
Jean-Pierre Alvarez is currently offline Jean-Pierre Alvarez
Messages: 2
Registered: April 2014
Junior Member
Hello,

I use a GridTableViewer and i want to go to line either using GridItem.setText or the label provider, but using "\n" in my text does not work !

Have you a solution for that ?


To be exact what i want to do is to wrap big lines of text in grids and have different heights for each row. I achieved to have different heights with GridItem.setHeight but not to do something as simple as going to line. I tried CR, LR, <BR>, <BR/>, \n.

Thanks.
Re: GridTableViewer, go to line with "\n" ? [message #1297460 is a reply to message #1297244] Tue, 15 April 2014 17:48 Go to previous messageGo to next message
Wim Jongman is currently offline Wim Jongman
Messages: 280
Registered: July 2009
Senior Member

Try GridColumn.setWordWrap(true)

http://git.eclipse.org/c/nebula/org.eclipse.nebula.git/tree/examples/org.eclipse.nebula.snippets/src/org/eclipse/nebula/snippets/grid/GridWithTextWrapping.java
Re: GridTableViewer, go to line with "\n" ? [message #1298407 is a reply to message #1297460] Wed, 16 April 2014 08:38 Go to previous message
Jean-Pierre Alvarez is currently offline Jean-Pierre Alvarez
Messages: 2
Registered: April 2014
Junior Member
Perfect it works, i feel a little silly to have missed that... I was trying to use the style parameter.

Thanks for your help. Smile
Previous Topic:IntensityGraph with XY trace data
Next Topic:SWT ComboViewer with ContentProposal and Pagination Control (large anmount of data)
Goto Forum:
  


Current Time: Sun Oct 26 02:10:25 GMT 2014

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

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