Path: utzoo!utgpu!water!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!rutgers!apple!voder!pyramid!prls!philabs!micomvax!ncc!alberta!calgary!arcsun!tony
From: tony@arcsun.UUCP (Tony Copping)
Newsgroups: comp.sys.mac.programmer
Subject: Re: Hiliting inactive controls (statText in dialog)
Summary: A smallish interface deviation?
Message-ID: <347@arcsun.UUCP>
Date: 20 Sep 88 23:00:29 GMT
References: <266@iconsys.UUCP> <10050017@eecs.nwu.edu> <17308@apple.Apple.COM>
Organization: Alberta Research Council, Calgary, Ab.
Lines: 27


[]

Here's how I handled this exact situation :

Editable text (in the program I am working on) appears in a THICKLY
outlined box. When the edit text is disabled, It is still in a box
(thus indicating that it is an editable field), but with a thin outline.
This looks quite nice, actually, and the text remains quite readable.
(I hate trying to read greyed-out text).

From the programmer's point of view, it is naturally much messier than
it appears. These text items are really two items (Just like the
default circle for the OK button) where one is the user item which draws
a rectangle, and the other is a text item (notice that I didn't specify
that it was necessarily an editText item). To disable the item, use SetDItem
to change its type to statText, and then set the DialogPeek->editField to -1.
(Of course, if there are other editText items in the window, you should
SelIText() one of those items.) To enable the item, just set its type back
to editText. Note that this also gives you the advantage of not having a
blinking cursor sitting in one of your disabled text items.

How 'bout some feedback on this idea as it is the most radical departure
I have made from the MacGuidelines I have made - I was quite surprised
to find that there was no facility for doing this in the mac toolbox.

Tony.