row resizing according to text inside [message #1015948] |
Mon, 04 March 2013 06:47  |
Eclipse User |
|
|
|
Hi,
I am trying to create a table where according to the example I want my row to resize
according to text inside the cells, so as to be able to see the wholecontent of all cells. So I use
TextPainter(true, true, 0, true).
The problem is that although when
my window's width gets smaller the rows get higher(exactly as I want), when the window's width gets bigger, rows height isn't getting smaller!
Is there anyone else facing same problem?
I'm wondering If this is a bug or I am doing sthing wrong..
Thanks
|
|
|
|
|
|
|
Re: row resizing according to text inside [message #1017374 is a reply to message #1017353] |
Mon, 11 March 2013 13:44   |
Eclipse User |
|
|
|
Hi,
I found the AutomaticRowHeightTextPainter and the Example in the GIT repository. But the problem with this implementation is, that it works only, if the table has exactly one column. The problem is, that the painter is called 'per cell' and while painting it has no idea about the text (and thus about the height) of other cells of the same row. So, if you add another row to the example, the Table is resizing back and forth: Painter of cell (X,Y) might increase the cell- (an thus row-) height, since the text does not fit in the column, whereas the painter of column (X+1, Y) decreases the row height, since it finds, it has to much space. This triggers a repaint, where the painter of (X,Y) again increases the cell-heigh...
Any idea how to solve this?
Regards, Ralf
|
|
|
|
|
Re: row resizing according to text inside [message #1017661 is a reply to message #1017654] |
Tue, 12 March 2013 05:32  |
Eclipse User |
|
|
|
Sorry, I discarded it and don't have it anymore. I think I added a map <RowIndex, MinHeight> and at the point where the height is calculated like in the AutomaticRowHeightTextPainter the map is checked additionally. But that might cause some other issues for lowering. Not sure anymore.
|
|
|
Powered by
FUDForum. Page generated in 0.34229 seconds