Home » Eclipse Projects » Remote Application Platform (RAP) » Editable TableViewer with background color
| |
Re: Editable TableViewer with background color [message #1074148 is a reply to message #1073624] |
Fri, 26 July 2013 07:39 |
Christian Wrobel Messages: 5 Registered: July 2013 |
Junior Member |
|
|
Hello Ivan,
here are three screenshots. In first picture you see an example table with two columns.
The second column is editable and hast another background color. When i edit this field it changes its color to mouseover (second picture).
After when i select another cell it changes its color to default color (third picture).
I set color in ColumnLabelProvider on update event:
table.addEditingColumn("editable field",
150,
new ColumnLabelProvider() {
@Override
public void update(ViewerCell cell) {
super.update(cell);
DemoObj element = (DemoObj)cell.getElement();
cell.setText(element.getEditableField());
cell.setBackground(new Color(Display.getCurrent(), 123, 123,123));
}
},
Best Regards,
Christian
-
Attachment: picture1.png
(Size: 10.30KB, Downloaded 615 times) -
Attachment: picture2.png
(Size: 10.58KB, Downloaded 601 times) -
Attachment: picture3.png
(Size: 10.75KB, Downloaded 605 times)
|
|
|
Re: Editable TableViewer with background color [message #1074160 is a reply to message #1074148] |
Fri, 26 July 2013 07:56 |
Ivan Furnadjiev Messages: 2427 Registered: July 2009 Location: Sofia, Bulgaria |
Senior Member |
|
|
Hi Christian,
I don't have an answer in hand. Please open a bugzilla with yours
snippet attached to it and we will investigate the cause.
Thanks,
Ivan
On 7/26/2013 10:39 AM, Christian Wrobel wrote:
> Hello Ivan,
>
> here are three screenshots. In first picture you see an example table with two columns.
>
>
>
> The second column is editable and hast another background color. When i edit this field it changes its color to mouseover (second picture).
>
>
> After when i select another cell it changes its color to default color (third picture).
>
>
>
> I set color in ColumnLabelProvider on update event:
>
>
> table.addEditingColumn("editable field",
> 150,
> new ColumnLabelProvider() {
>
> @Override
> public void update(ViewerCell cell) {
> super.update(cell);
> DemoObj element = (DemoObj)cell.getElement();
>
> cell.setText(element.getEditableField());
>
> cell.setBackground(new Color(Display.getCurrent(), 123, 123,123));
>
> }
> },
>
>
>
> Best Regards,
> Christian
>
--
Ivan Furnadjiev
Twitter: @EclipseRAP
Blog: http://eclipsesource.com/blogs/
Professional services for RAP and RCP?
http://eclipsesource.com/services/rap/
|
|
| | |
Goto Forum:
Current Time: Tue Sep 24 13:12:26 GMT 2024
Powered by FUDForum. Page generated in 0.06010 seconds
|