Windows 7 SWT表选择了行突出显示颜色 [英] Windows 7 SWT Table selected row highlight color

查看:170
本文介绍了Windows 7 SWT表选择了行突出显示颜色的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有办法在Windows 7的Aero主题中设置SWT表(FULL_SELECTION样式)突出显示的行的背景颜色?它似乎是表格背景颜色的衍生颜色。但除此之外,我似乎无法控制使用何种颜色。

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?

谢谢!
RAY

Thank you! RAY

推荐答案

根据SWT Win32源文件,确切地第1611行

According to SWT Win32 source file, exactly line 1611

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

SWT.FULL_SELECTION 的图形样式是直接从OS获取(对于 LVS_EX_FULLROWSELECT 请参阅 MSDN上的扩展列表 - 查看样式)。

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..

这篇关于Windows 7 SWT表选择了行突出显示颜色的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆