[英]Java AWT TextField does not get ghosted when disabled on Windows
I have an AWT text field that gets enabled and disabled based on the state of a Checkbox. 我有一个根据复选框状态启用和禁用的AWT文本字段。 On OSX when the TextField is disabled it gets ghosted but this does not occur on Windows 7. Is this how it is supposed to work on Windows? 在OSX上,当禁用TextField时,它会变成幻影,但在Windows 7上不会发生。这是否应该在Windows上起作用? Is there a way to get the TextField to become ghosted on Windows. 有没有一种方法可以使TextField在Windows上重影。 Note: We are doing a little maintenance on some very old code and for compatibility we must use AWT and cannot switch over to swing at this time. 注意:我们正在对一些非常旧的代码进行一些维护,为了兼容,我们必须使用AWT,并且此时不能切换到摆动。
AWT gets look and feel from window manager of operating system. AWT从操作系统的窗口管理器获得外观。
On OSX disabled AWT text field looks ghosted because OSX window manager makes it look so. 在OSX禁用的情况下,AWT文本字段看起来像是幻影的,因为OSX窗口管理器使它看起来像这样。
So it wont be possible to bring ghosted effect but will look grayed out using AWT for disabled component on Windows 7. 因此,不可能带来幻影效果,但对于Windows 7上的禁用组件,使用AWT时将显示为灰色。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.