Community
Participate
Working Groups
Build Identifier: 3.6 Helios Release Using Cocoa ws. The multiline text control appears differently from the single line one, when setEnabled is set to false. The cocoa multiline text control behaves exactly the same as the single line one, ideally so should the SWT control. Reproducible: Always Steps to Reproduce: 1. Run the SWT controls examples 2. On the SWT Text example tab select SWT.SINGLE and toggle enablement 3. Select SWT.MULTI and toggle enablement
This is platform behavior, unfortunately. Single-line Text objects use NSTextField, which draws its contents with the disabled text color if the control is disabled. Multiline Text objects use NSTextView, which doesn't really support the notion of a 'disabled' appearance. Having said that, I do think we should try to do something here. Right now a multiline Text has no visual indication that it's disabled. We can set the text color to NSColor.disabledControlTextColor, but I'd like to find someplace in the Mac UI that disables an NSTextView.
This isn't that bad, actually. For the MULTI case we can just add an alpha to the foreground color if one has been set, and use disabledControlTextColor otherwise. It looks like that's what NSTextField is doing anyway.
Fixed > 20110105.