Windows 7 SWT Table selected row highlight color

夙愿已清 提交于 2019-12-04 03:19:55

问题


Is there a way to set the background color of a highlighted row of a SWT Table (FULL_SELECTION style) in Windows 7's Aero theme? It appears that it's a derived, lighter color from the background color of the Table. But other than that, I don't seem to have much control over what color to use.

This is a problem to us because some of our table items' texts (foreground) are grayish whites, so they are very harder to read if the row is selected on a light-colored background. I've already set the background color of the table to Black, but the text is still pretty hard to see.

Are there any suggestions on how to control the color?

Thank you! RAY


回答1:


According to SWT Win32 source file, exactly line 1611

if ((style & SWT.FULL_SELECTION) != 0) bits1 |= OS.LVS_EX_FULLROWSELECT;

the graphics style of SWT.FULL_SELECTION is get directly from OS (for LVS_EX_FULLROWSELECT see Extended List-View Styles on MSDN).

So it's not possible to change the style..



来源:https://stackoverflow.com/questions/7006924/windows-7-swt-table-selected-row-highlight-color

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!