Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!iuvax!rutgers!mcnc!kk From: kk@mcnc.org (Krzysztof Kozminski) Newsgroups: comp.sys.mac.programmer Subject: Re: Moving a Textedit field in a modal dialog Message-ID: <1341@speedy.mcnc.org> Date: 22 Aug 89 13:00:48 GMT References: <15088@dartvax.Dartmouth.EDU> <21428@cup.portal.com> <58078@tut.cis.ohio-state.edu> <8356@hoptoad.uucp> Reply-To: kk@mcnc.org.UUCP (Krzysztof Kozminski) Organization: Microelectronics Center of NC; RTP, NC Lines: 42 In article <8356@hoptoad.uucp> tim@hoptoad.UUCP (Tim Maroney) writes: >In article <58078@tut.cis.ohio-state.edu> Scott Sutherland > writes: >>The problem with this is that SetDItem (which places the item in the given >>dialog's item list) pre-supposes that the item is NOT already in the list. > >No; in fact, I don't know whether you can use SetDItem to add an item >to a dialog item list. The routine description doesn't say that you can. Seems to me you can't. A couple years ago I tried to use SetDItem to add an item and got a rather spectacular crash. For adding new items to existing dialogs, it might be a good idea to grab some code from the TN that tells how to add items to Print Dialogs (note: only about 20% of the code therein is relevant). >>Luckily there is a really easy way to do this. Simply call HideDItem. > >Yes, this is true, so long as you don't care about compatibility with old >ROM machines. Few people do these days.... Don't system versions from 4.2 onward have patches for old ROMs? It seems to me that you'd have to come up with an (old ROM + ancient system) combination to have HideDItem/ShowDItem fail ... (disclaimer: I am not sure about this). >And one subjective note -- I have some aesthetic qualms about dialogs >that change their appearance. In a very few cases they make sense, and >for all I know this may be one of them. Seconded. From user's point of view it is less confusing if a dialog item gets deactivated (drawn in gray pattern) rather than disappears altogether. It is easy to do with controls (hilite them with 255), somewhat more of a problem with text items (got to deactivate them so that clicks in the item are ignored, and overdraw with grey in Bic mode. I recall also some problems I had with tab key moving the insertion point into inactive text item - if this is indeed a problem and not my false recollection, it can be fixed with a dialog filter routine). >Tim Maroney, Mac Software Consultant, sun!hoptoad!tim, tim@toad.com KK -- "The party was a masquerade; the guests were all wearing their faces."