Re: Missing inactive and disabled states on some controls
Re: Missing inactive and disabled states on some controls
- Subject: Re: Missing inactive and disabled states on some controls
- From: Ryan McGann <email@hidden>
- Date: Wed, 5 Feb 2003 18:52:56 -0800
isEnabled and setEnabled are methods of NSControl, which NSTableView
and NSBrowser inherit from, so you can use these methods for them. I'm
not sure about NSBox though.
Yes, but the problem with NSTableView/NSBrowser is that calling
setEnabled: has no effect on the visual appearance of the control. In
the HIToolbox for Carbon, the Data Browser and List Manager display
their contents in a dimmed state when you call SetControlEnabled( false
). Unless I'm missing something, Cocoa requires you to draw the text
yourself in a dimmed-text color and manage disabling activity when
disabled yourself. It's a lot more work than I would have thought.
The same applies to NSBox. In Carbon you can disable an entire
hierarchy of controlscalling SetControlEnabled disables the container,
and all of its children. In Cocoa you have to iterate through every
subview of the view, test whether it responds to setEnabled: and call
setEnabled: if it does. Hardly "easy".
I'd encourage you to file enhancement requests with Apple about this.
My requests must have gotten lost (they've been Open/Analyze since last
year).
Ryan
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.