Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » Adding buttons to table rows
Adding buttons to table rows [message #1017581] Tue, 12 March 2013 02:14 Go to next message
Setya Mising name is currently offline Setya Mising name
Messages: 486
Registered: July 2009
Senior Member
Hi all,

I need to add some push buttons to table rows or if possible a toolbar and they should be visible all the time.

AFAIK my options are EditingSupport and TableEditor. The former only gets created when user actually selects the cell. While in order to use the latter I have to create & add TableItem manually and this is not possible since I populate the table via ContentProvider.

Any insights would be greatly appreciated.


Thanks & Regards,

Setya
Re: Adding buttons to table rows [message #1017601 is a reply to message #1017581] Tue, 12 March 2013 03:16 Go to previous messageGo to next message
Daniel Krügler is currently offline Daniel Krügler
Messages: 853
Registered: July 2009
Senior Member
On 2013-03-12 07:14, Setya Mising name wrote:
> Hi all,
>
> I need to add some push buttons to table rows or if possible a toolbar
> and they should be visible all the time.
>
> AFAIK my options are EditingSupport and TableEditor. The former only
> gets created when user actually selects the cell. While in order to use
> the latter I have to create & add TableItem manually and this is not
> possible since I populate the table via ContentProvider.
>
> Any insights would be greatly appreciated.

A recommended strategy is to use a button snapshot as described here:

http://tom-eclipse-dev.blogspot.de/2007/01/tableviewers-and-nativelooking.html

HTH & Greetings from Bremen,

Daniel Krügler
Re: Adding buttons to table rows [message #1017671 is a reply to message #1017601] Tue, 12 March 2013 05:49 Go to previous messageGo to next message
Setya Mising name is currently offline Setya Mising name
Messages: 486
Registered: July 2009
Senior Member
Hi Daniel,

Thank you for your response and also greeting from Jakarta, Indonesia.

Sorry I did not mention that I use RAP and it does not support GC as the samples in your link extensively use.

Regards,

Setya
Re: Adding buttons to table rows [message #1018080 is a reply to message #1017671] Wed, 13 March 2013 01:07 Go to previous message
Setya Mising name is currently offline Setya Mising name
Messages: 486
Registered: July 2009
Senior Member
Hi all,

I got it working.

I use ColumnLabelProvider by overriding its update(ViewerCell) method in which I create TableEditor.

Now I still have to worry about its background to match the table rows's.

Regards,

Setya
Previous Topic:Problem using focus listener
Next Topic:Pretty SWT
Goto Forum:
  


Current Time: Wed Jul 30 23:24:02 EDT 2014

Powered by FUDForum. Page generated in 0.01764 seconds