Aligning TableEditor on Linux [message #652291] |
Thu, 03 February 2011 08:50  |
Eclipse User |
|
|
|
Hi,
I have a question regarding TableEditors' horizontal alignment. Namely, I'm setting checkbox buttons OR images to TableItems inside a specified column, depending on some condition. I have a requirement that TableEditors are horizontally aligned inside a cell. So I'm using TableEditor.horizontalAlignment = SWT.CENTER to achieve this. But when running my application with SWT for GTK, TableEditors are not center aligned if I'm setting images too, while on Mac and Windows, editors stay center aligned. On Linux it seems that TableEditors' left side is put on the right side of the Image, as if I would be setting an Image to a cell AND an TableEditor right next to it, which is not the case. My code looks like this:
Table table = new Table(...);
if (condition)
{
Button button = new Button(table, SWT.CHECK);
TableEditor editor = new TableEditor(Table table);
editor.horizontalAlignment = SWT.CENTER;
editor.setEditor(button, row, column);
}
else
{
row.setImage(column, someImage);
}
The resulting table looks like this:

Is it possible to circumvent this unwanted alignment of TableEditors on GTK?
Best regards,
Albert
|
|
|
|
Powered by
FUDForum. Page generated in 0.05701 seconds