Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Technology Project and PMC » Cannot center image in table column
Cannot center image in table column [message #51369] Thu, 03 April 2003 15:00
Eclipse UserFriend
Originally posted by: lgauthier.zaq.com

I am trying to center images in a table column but no cigar!

It is always left aligned!

Centering text is no problem.

Here is a code snippet:
//-------------------
TableColumn column5 = new TableColumn(table, SWT.CENTER);
column5.setText("Required");
column5.setWidth(80);
//------------------

I am using a TableViewer and subclassed CheckboxCellEditor so that layout
data would be SWT.CENTER but that does not work either.

Here is the CCheckboxCellEditor class:

//--------------------------
public class CCheckboxCellEditor extends CheckboxCellEditor {
public CCheckboxCellEditor(Composite parent) {
super(parent);
}
/**
* @return the layout data object
*/
public LayoutData getLayoutData() {
LayoutData result = new LayoutData();
result.horizontalAlignment = SWT.CENTER;
return result;
}
}
Previous Topic:Eclipse won't open!
Next Topic:Cannot center image in table column
Goto Forum:
  


Current Time: Thu Apr 25 12:40:54 GMT 2024

Powered by FUDForum. Page generated in 0.02808 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top