Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!ames!apple!han From: han@Apple.COM (Byron Han) Newsgroups: comp.sys.mac.programmer Subject: Re: Moving a Textedit field in a modal dialog - solution (?) Message-ID: <34350@apple.Apple.COM> Date: 26 Aug 89 17:24:48 GMT References: <15088@dartvax.Dartmouth.EDU> <21428@cup.portal.com> <58078@tut.cis.ohio-state.edu> <8356@hoptoad.uucp> <1341@speedy.mcnc.org> <8376@hoptoad.uucp> <1354@speedy.mcnc.org> Organization: Apple R&D - Networking & Communications Lines: 31 In article <1354@speedy.mcnc.org> kk@mcnc.org.UUCP (Krzysztof Kozminski) writes: >In article <8376@hoptoad.uucp> tim@hoptoad.UUCP (Tim Maroney) writes: >>Deactivation is indeed a better solution, though it doesn't completely >>address the problem of modality. But at least it gives a clear visible >>indication of the modal behavior. With text edit items, you can always >>disable them by turning them into user items with SetDItem and binding >>a "draw light gray" drawing procedure, then doing an InvalRect on the >>item's surrounding rectangle. I don't think this causes any problems. > >OK, I got the following idea: make an additional, inactive userItem >that exactly overlaps the text edit item that may be subject to >disappearance, and let its procedure draw a gray rectangle in patOr >mode. Then just do Show/HideDItem on the text edit item as needed. Actually, a better solution is to change the editText item into a statText item using GetDItem/SetDItem and to also use an auxilliary userItem which can be hidden if the text edit item is active and shown if the text edit item is deactivated. This aux userItem paints in patOr mode ltGray. +-----------------------------------------------------------------------------+ | Disclaimer: Apple has no connection with my postings. | +-----------------------------------------------------------------------------+ Byron Han, CommToolbox Scapegoat Macintosh - Catch the Wave! Apple Computer, Inc. ----------------------------------------- 20525 Mariani Ave, MS27Y Internet: han@apple.COM Cupertino, CA 95014 UUCP:{sun,voder,nsc,decwrl}!apple!han ------------------------------------ GENIE:BYRONHAN CompuServe:72167,1664 ATTnet: 408-974-6450 Applelink:HAN1 HAN1@applelink.apple.COM -------------------------------------------------------------------------------