Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!think.com!hsdndev!dartvax!eleazar.dartmouth.edu!ari From: ari@eleazar.dartmouth.edu (Ari Halberstadt) Newsgroups: comp.sys.mac.programmer Subject: Re: Hiliteing Text Items in Dialogs Message-ID: <1991May26.210154.23125@dartvax.dartmouth.edu> Date: 26 May 91 21:01:54 GMT References: <1991May24.040412.6929@world.std.com> <1991May25.132654.10182@umiami.ir.miami.edu> Sender: news@dartvax.dartmouth.edu (The News Manager) Organization: Dartmouth College, Hanover, NH Lines: 20 In article <1991May25.132654.10182@umiami.ir.miami.edu> dweisman@umiami.ir.miami.edu (Ordinary Man) writes: >In article <1991May24.040412.6929@world.std.com>, barry@world.std.com (Barry L Wolman) writes: > >>I've got a dialog box that contains several static and edit text fields that >>I'd like to "grey out" or show normally depending on what user selects from a >Stick a userItem around the text to be greyed (one for each text Item). Then >when you want to grey that item, just use a FillRect on the userItem's rect >with penmode patBic with grey. That should "dim" the text. > >Use the Dialog Manager's routines Hide/Show DItem documented in IM IV I >believe. These routines hide the item (by moving them out of the dialog's >visRgn). If the item is an editText item you should also change its type to a static text item. This should prevent a tab from moving the insertion point to the grayed out or invisible item; notice that it may be a little trickier do keep the item from responding to tabs than just changing its type. The routines Hide/Show DItem don't move an item out of the dialog's visRgn, they move it out of the dialog's portRect.