默认情况下,如果选择(切换)SWT.PUSH 按钮,则该按钮呈浅蓝色阴影。我想让阴影变暗一点,以便更明显地看到哪些按钮被切换。有谁知道我该怎么做?谢谢。
最佳答案
Control
的文档包含方法 Control#setBackground(Color)
的此部分:
<小时/>Sets the receiver's background color to the color specified by the argument, or to the default system color for the control if the argument is null.
Note: This operation is a hint and may be overridden by the platform. For example, on Windows the background of a Button cannot be changed.
但是,您可以“劫持”绘画事件并在 Button
上绘制您想要的任何内容。 Here是与此主题相关的问题。
关于java - 如何在切换 SWT.PUSH 按钮时设置较暗的阴影,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17674221/