Skip to main content



      Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » How to add check option in cell of table (not in first column)
How to add check option in cell of table (not in first column) [message #465194] Wed, 07 December 2005 21:44 Go to next message
Eclipse UserFriend
I need to add a check option in 3rd or 4th column.
In Table, it creates a check option in the 1st column by adding SWT.CHECK

table = new Table(parent, SWT.CHECK | SWT.SINGLE | SWT.FULL_SELECTION)

I can not find the way to add check option in any column other 1st column.
Is it possible? How to do that?

Thanks!!
Re: How to add check option in cell of table (not in first column) [message #465214 is a reply to message #465194] Thu, 08 December 2005 04:15 Go to previous messageGo to next message
Eclipse UserFriend
I don't think the native table supports this.

Check out KTable that allows you to do such things:
http://sourceforge.net/projects/ktable/

Johnson wrote:
> I need to add a check option in 3rd or 4th column.
> In Table, it creates a check option in the 1st column by adding SWT.CHECK
>
> table = new Table(parent, SWT.CHECK | SWT.SINGLE | SWT.FULL_SELECTION)
>
> I can not find the way to add check option in any column other 1st column.
> Is it possible? How to do that?
>
> Thanks!!
>
>
>
Re: How to add check option in cell of table (not in first column) [message #465217 is a reply to message #465194] Thu, 08 December 2005 08:55 Go to previous messageGo to next message
Eclipse UserFriend
In your label provider, return "" from the getColumnText for those
columns and put code into your getColumnImage method to return one of two
images for the chosen columns. One image is a square, the other a
checked square. it works, ive done this myself on 2 columns and made them
editable too.
Re: How to add check option in cell of table (not in first column) [message #465313 is a reply to message #465194] Thu, 08 December 2005 16:37 Go to previous message
Eclipse UserFriend
The TableViewer supports check box in other columns by using the image
field. See CheckBoxCellEditor in JFace.

"Johnson" <ljshuenn@realtek.com.tw> wrote in message
news:dn86m3$8ef$1@news.eclipse.org...
>I need to add a check option in 3rd or 4th column.
> In Table, it creates a check option in the 1st column by adding SWT.CHECK
>
> table = new Table(parent, SWT.CHECK | SWT.SINGLE | SWT.FULL_SELECTION)
>
> I can not find the way to add check option in any column other 1st column.
> Is it possible? How to do that?
>
> Thanks!!
>
>
>
Previous Topic:addListner to a extended Class
Next Topic:PalmOs Porting
Goto Forum:
  


Current Time: Mon Jul 07 20:55:52 EDT 2025

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

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

Back to the top