|
|
Re: TreeItem.getImageBounds not working in RAP1.4 [message #799886 is a reply to message #799706] |
Thu, 16 February 2012 12:35 |
|
Hi,
Since the CENTER style flag also affects only the texts in SWT, we
should not change this behavior in RAP. And as extending TableItems or
TreeItems is discouraged in SWT, I don't consider overriding
getImageBounds() an acceptable practice, although I admit that it is a
creative approach!
Maybe markup will be an alternative: RAP 1.5 will support texts with
markup in Tree and Table. This will allow you to insert the images into
the texts using an <img> element. Does that sound like a possible solution?
Regards, Ralf
--
Ralf Sternberg
Twitter: @EclipseRAP
Blog: http://eclipsesource.com/blogs/
Professional services for RAP and RCP?
http://eclipsesource.com/services/rap/
|
|
|
|
|
Re: TreeItem.getImageBounds not working in RAP1.4 [message #800679 is a reply to message #800559] |
Fri, 17 February 2012 10:46 |
|
Hi Fred,
that's challenging. In SWT, the typical approach is to draw those
checkboxes into the cells using GC. In RAP 1.5, I#d suggest the markup
approach I already described.
In RAP 1.4, the only solution I could think of would be to create an
image with enough whitespace padding to appear centered. Of course,
this only works for fixed column widths.
As an alternative, you could only display colorized texts and open a
checkbox cell editor on pressing Return.
Regards, Ralf
--
Ralf Sternberg
Twitter: @EclipseRAP
Blog: http://eclipsesource.com/blogs/
Professional services for RAP and RCP?
http://eclipsesource.com/services/rap/
|
|
|
|
Powered by
FUDForum. Page generated in 0.03573 seconds