Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » NatTable » Multiline text cell editor
Multiline text cell editor [message #1755650] Mon, 06 March 2017 14:47 Go to next message
Jakub Szecówka is currently offline Jakub SzecówkaFriend
Messages: 1
Registered: March 2017
Junior Member
Hi,

I would like to know how can I create a cell editor for text with multiple lines. In my application I often have to display and edit multi-line text inside cells. I've handled displaying that kind of text by implementing custom TextPainter (I also needed to add some aditional functions like maximum visible lines).

Things got a little bit more complicated when I try to edit text. The main issue is that the editors (MultiLineTextCellEditor) height is equal to row height, but it looks like it doesn't take into consideration that my custom TextPainter makes the row quite high. In the end the effective workspace of the text editor is 1 line, while the cell I'm editing is much higher.

Some images that might help with understanding the issue


  1. How it looks with custom TextPainter index.php/fa/28674/0/
  2. What happens when editing the cell index.php/fa/28675/0/


How do I implement a cell text editor that can resize its effective area to the actual size of the cell I'm editing?
Re: Multiline text cell editor [message #1755695 is a reply to message #1755650] Mon, 06 March 2017 20:22 Go to previous message
Dirk Fauth is currently offline Dirk FauthFriend
Messages: 2902
Registered: July 2012
Senior Member
I don't know what and how you customized your TextPainter. And I don't agree with the statement that in general the height of the multiline editor has the same height as the row. It actually derives the height from the content. The size of the editor is calculated in MultiLineTextCellEditor#calculateControlBounds(Rectangle). Maybe you need to override the default implementation to match your custom implementation in the TextPainter.
Previous Topic:Using Filtering and Sorting with TreeList.Format ( Tree )
Next Topic:Custom filter for not displayed values in table
Goto Forum:
  


Current Time: Fri Apr 26 15:36:50 GMT 2024

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

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

Back to the top