我需要將禁用控件的前景色設置爲黑色而不是該灰色。我看到可以設置背景顏色,但我無法設置前景色。它是否可行?如果是這樣,怎麼樣?我可以更改禁用swt控件的前景色
0
A
回答
1
如果它是非常重要的,你也許可以掛接到Paint事件繪製自己的文字...我還沒有嘗試過,雖然:-)
2
取決於您想要更改後/前景的控件。在SWT Javadoc the setBackgroundColor method你可以找到本說明
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.
相關問題
- 1. wp7更改控件的背景顏色禁用控件
- 2. 我可以在控件中使用2種前景色嗎?
- 3. 加載內容之前可以更改WebBrowser控件的背景顏色嗎?
- 4. 是否可以更改CMFCEditBrowseCtrl控件的背景顏色?
- 5. 我可以更改螢幕控制檯背景顏色嗎?
- 6. 用terminfo可以同時改變前景色和背景色嗎?
- 7. 禁用時更改控件顏色
- 8. 更改contentpresenter的前景色
- 9. 更改ComboBoxItem的前景色
- 10. 更改JButton的被禁用的前景(字體)顏色爲Windows
- 11. 更改禁用組合框的前景色
- 12. Java:更改jLabel前景色
- 13. 如何在.NET Grid View中更改控件的前景色?
- 14. 是否可以更改Spyder Python控制檯的背景顏色?
- 15. 在SWT中ExpandBar/ExpandItem背景/前景顏色SWT
- 16. 可以更改android背景黑色嗎?
- 17. 我們如何使用wxpython更改wx.MenuBar背景和前景色?
- 18. Android - 用webview加載URL後我可以更改背景顏色
- 19. 更改終端背景和前景色
- 20. 基於背景更改TextBlock前景色
- 21. SWT Java:如何更改Label控件中文本的顏色?
- 22. 禁用時,可以更改asp.net文本框的背景顏色嗎?
- 23. 設置swt table列前景色
- 24. 更改DockPanel的背景以匹配禁用的ListView的背景顏色
- 25. 使用背景顏色更改TextBlock前景色
- 26. 如何使用jquery更改以前的div背景色?
- 27. 如何更改wxRadioButton的前景色?
- 28. 更改按鈕的前景色
- 29. 更改android listview項目的前景色
- 30. SWT - 我可以自定義繪製文本控件的背景嗎?