Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Scout » Clearing cell decorations in editable table cell
Clearing cell decorations in editable table cell [message #1507228] Thu, 11 December 2014 12:30 Go to next message
Urs Beeli is currently offline Urs BeeliFriend
Messages: 573
Registered: October 2012
Location: Bern, Switzerland
Senior Member
We have an editable table. One of the editable columns is of type AbstractColumn<TriState> and we use execDecorateCell() to set icons representing the three possible states (unchecked, checked, indeterminate).

Furthermore, we have overwritten execPrepareEdit() to return a TriStateField (a custom control offering a checkbox which toggles through three states) so the user can change these values.

Functionally, this works, we can click in the cell, get the tristate field, can modify the value which then gets written back to the tristate value and the cell decoration is updated.

However, the cell decoration is still visible when the tristate field is drawn, which is confusing and ugly.

Is there any way to clear the cell decoration in execPrepareEdit()? We've tried setting the icondId on the cell to null. Sadly, this does not clear the icon, instead it makes the input field disappear (probably because setIconId() triggers a call to execDecorateCell()).

Is there any way to do this?
Re: Clearing cell decorations in editable table cell [message #1507241 is a reply to message #1507228] Thu, 11 December 2014 12:49 Go to previous messageGo to next message
Jeremie Bresson is currently offline Jeremie BressonFriend
Messages: 1252
Registered: October 2011
Senior Member
This reminds me what we have discussed here: https://www.eclipse.org/forums/index.php/t/796088/

I am not sure if there is a solution... This might be a bug/a limitation of the current SWT renderer.
Re: Clearing cell decorations in editable table cell [message #1511037 is a reply to message #1507241] Sun, 14 December 2014 15:56 Go to previous messageGo to next message
Urs Beeli is currently offline Urs BeeliFriend
Messages: 573
Registered: October 2012
Location: Bern, Switzerland
Senior Member
I had forgotten about the fact that you had already mentioned the lack of a way to hide the icon when editing the field in that old discussion.

Thanks for the reminder, I'll open a bug to see if there is a way to have this fixed.
Re: Clearing cell decorations in editable table cell [message #1707663 is a reply to message #1511037] Tue, 08 September 2015 12:16 Go to previous messageGo to next message
Adrian Sacchi is currently offline Adrian SacchiFriend
Messages: 10
Registered: January 2013
Junior Member
The requirement was implemented with https://git.eclipse.org/r/#/c/55461/ (will be included in mars.1 rc3)

--> The cell-ediotor will now always be installed over the entire cell. If a icon is present it will be hidden. (same behavior as in Swing). Therefore, with this solution there is no need to clear the icon in the execPrepareEdit() method.
Re: Clearing cell decorations in editable table cell [message #1709785 is a reply to message #1707663] Thu, 01 October 2015 06:17 Go to previous message
Urs Beeli is currently offline Urs BeeliFriend
Messages: 573
Registered: October 2012
Location: Bern, Switzerland
Senior Member
We'll test this next week, after updating to Mars SR1 tomorrow. Thanks
Previous Topic:AccessControlService execLoadPermissions() called a lot
Next Topic:table row context menu when table is empty
Goto Forum:
  


Current Time: Sat Apr 27 01:24:18 GMT 2024

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

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

Back to the top