• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Missing inactive and disabled states on some controls
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

  • Prev by Date: Re: Objective-C in signal handlers (was Re: Inter process communication question)
  • Next by Date: Question about TableView - how do I know which tableView?
  • Previous by thread: Re: Missing inactive and disabled states on some controls
  • Next by thread: Cocoa/Java: com.apple.cocoa.admin.InternetConfig;
  • Index(es):
    • Date
    • Thread