Path: utzoo!attcan!uunet!peregrine!elroy!ames!nrl-cmf!ukma!rutgers!att!ihwpt!ihnp4!poseidon!ech From: ech@poseidon.UUCP (Edward C Horvath) Newsgroups: comp.sys.mac.programmer Subject: Re: Hiliting inactive controls (statText in dialog) Message-ID: <509@poseidon.UUCP> Date: 21 Sep 88 18:08:19 GMT References: <10050017@eecs.nwu.edu> Organization: AT&T Information Systems, Lincroft, NJ Lines: 20 From article <10050017@eecs.nwu.edu>, by bob@eecs.nwu.edu (Bob Hablutzel): >> ...I may want some editText fields inactive. Thus I want to >> do something to the labels to "dim" them... > > ...Inactivate > the item (using SetDItem and adding itemDisable to the item type), then > set the paint mode to srcAnd and paint the view rectangle with a grey > pattern. When the item is reactivated, grab the text edit handle (tricky, > but not impossible), and refresh it.... Indeed, a userItem that exactly overlaps the text item -- and appears LATER in the DITL, works just fine here. When your drawing routine is called, it either does nothing or does the gray paint with srcBic. There is no need to "grab the text edit handle" to force the refresh: just use GetDItem to get the item's rectangle, and call InvalRect with that. The subsequent draw will refresh the text (and your userItem drawing routine will presumably do nothing). =Ned Horvath=