Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > Graying "label text"

Graying "label text"
Thread Tools
Dedicated MacNNer
Join Date: Nov 2000
Status: Offline
Reply With Quote
Jun 20, 2002, 09:13 AM
 
Hello ...

I want to gray out the label text accompanying a disabled pop-up button. Disabling the text field has no visual effect; setting the textColor to [NSColor disabledControlTextColor] or [NSColor lightGrayColor] works, but the label text is still much darker than the titles of disabled radio buttons and check boxes nearby. I can concoct a color from RGB components, but I don't know what the "official" values are supposed to be so that the labels match the disabled radio buttons and check boxes.

What's the magic formula?

By the way: I'm disabling elements in an NSBox by stepping through the subviews (of the subview) of the box with an array enumerator, checking whether each element "respondsToSelector:@selector(setEnabled", and, if so, disabling that element. It's straightforward enough (except for graying out the text fields), just a very few lines, but I'm wondering if I might be missing "the" solution.

Thanks,

DayLateDon
     
Fresh-Faced Recruit
Join Date: May 2002
Location: oakland, CA
Status: Offline
Reply With Quote
Jun 24, 2002, 10:43 PM
 
I just found this in the documentation:

<a href="http://developer.apple.com/techpubs/macosx/Cocoa/TasksAndConcepts/ProgrammingTopics/DrawColor/Tasks/SystemColors.html#//apple_ref/doc/uid/20000790" target="_blank">Cocoa Documentation - System Colors</a>

"A number of system colors, while still valid, are no longer meaningful under Aqua. These include any of the ones with 'control' in their name. They return the old Platinum appearance colors which are usually a shade of gray."

I wanted the same info; I guess that's why pixie is included with the developer tools so you can just manually set RGB values. Seems wierd.

gw
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 01:27 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2