简体   繁体   中英

Change the font color of SWT TableCursor

I've been messing around with SWT's TableCursor for navigating through tables using the keyboard and there is one issue I can't figure out.

The default color for a selected item seems to always be the same color even when changing the text font to something else. Is there a way to change this? I'm wanting to specifically make it look more like a mouseover like the following:

TableCursor与鼠标悬停

As you can see the text is changed to a light blue and the focus ring (dotted black line) is around the cell. I would prefer if this was somewhat consistent so the two looked the same or very similar. Is this even possible using a TableCursor?

您可以尝试使用TableCursor的setBackground (Color color)setForeground (Color color)方法来实现所需的功能。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM