Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
默认情况下,如果选择(切换) SWT.PUSH 按钮,则该按钮带有浅蓝色阴影。我想让阴影更暗一点,这样可以更清楚地看到哪些按钮被切换。有谁知道我该怎么做?谢谢。
的文档Control包含该方法的本节Control#setBackground(Color):
Control
Control#setBackground(Color)
将接收器的背景颜色设置为参数指定的颜色,如果参数为空,则设置为控件的默认系统颜色。 注意:此操作是一个提示,可能会被平台覆盖。例如,在 Windows 上,无法更改 Button 的背景。
将接收器的背景颜色设置为参数指定的颜色,如果参数为空,则设置为控件的默认系统颜色。
注意:此操作是一个提示,可能会被平台覆盖。例如,在 Windows 上,无法更改 Button 的背景。
但是,您可以“劫持”绘画事件并在Button. 这是与该主题相关的问题。
Button