Image alignment in SWT TableViewer
I just found out that its somehow not possible to align the image in the swt tableviewer. Creating a TableColumn with SWT.RIGHT (for example) has no effect on that column as long as its labelprovider returns an image for it. Question: Is there any other way to align the image instead of modifying the image file itself and adding an extra pixel to it?
+2
source to share
1 answer
I believe you are using a base platform constraint (or something like that). You can have complete control over what goes into the cell if you draw it yourself. There is a snippet that shows you how to do this.
Sample Table Snippet: Draw images on the right side of the table
Of course, you also need to draw whatever text you want in the cell.
+3
source to share