Community
Participate
Working Groups
I would like to be able to reduce the height of a table row. (I wish to have wrapping text in a cell which is all displayed as the column width is changed). As far as I can see, this does not appear to be possible. I noted the following comment on the newsgroups: http://dev.eclipse.org/newslists/news.eclipse.platform.swt/msg29472.html
*** Bug 130031 has been marked as a duplicate of this bug. ***
Just wanted to add my two cents: In Aptana Studio we've made keybindings to allow the user to increase/decrease font size and extended the theme's text editor font to also apply to a subclass of the Common Navigator (like Project Explorer). If a user bumps the font size up and then shrinks it the tree rows in the navigator remain at the larger size. I've added very hacky code to force the row height down in a measureitem listener on the tree, but the code really only applies to the cocoa SWT impl. I don't know if this bug is across all WS, but it looks like this was filed on Windows. In any case, it'd be nice to have an official API for "shrinking" an expanded row height for the tree.
You should be able to shrink table item height by setting the font or by using custom draw.
Setting the font on the tree doesn't shrink it at all. Returning a smaller height for all rows via a MeasureItem listener doesn't either. I'd prefer not to have to go down that low level to do custom drawing just to set the row height again. I have platform specific code in reflection for mac and windows to handle this, but it's pretty ugly. When font size changes on windows I call setItemHeight on the tree through reflection. For Mac Cocoa I call setRowHeight on the view field on the Tree control via reflection.
I just ran into this problem too. I have no idea how to work on a fix similar to the one Chris was talking about. Chris, any advice, direction, or code snippets? I do not care how messy the fix is, I am humble. peace. -jared
Created attachment 220735 [details] Helper class to work around bug 154341 I've created a little helper class to work around this problem. It uses the way Chris Williams described above.
I've just seen that in bug report 148039 (https://bugs.eclipse.org/bugs/show_bug.cgi?id=148039) a similar work around is added already.
Are there any plans to fix this?