Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!csd4.csd.uwm.edu!bionet!ames!amdahl!nsc!taux01!cyosta From: cyosta@taux01.UUCP ( Yossie Silverman ) Newsgroups: comp.sys.mac.programmer Subject: Re: Moving a Textedit field in a modal dialog Message-ID: <2414@taux01.UUCP> Date: 22 Aug 89 07:39:28 GMT References: <15088@dartvax.Dartmouth.EDU> <21428@cup.portal.com> <58078@tut.cis.ohio-state.edu> <8356@hoptoad.uucp> Reply-To: cyosta@taux01.UUCP ( Yossie Silverman ) Organization: National Semiconductor (IC) Ltd, Israel Lines: 36 I had to do this once for a program that had a Dialog which served as a small spread-sheet. I used the List manager to put up the spreadsheet display itself (grid and data) and a TE item for input into the active cell. The way I moved the TE item around was the following sequence: HideDItem GetDItem SetDitem (to new location with 16384 added to the horizontal coordinates) ShowDItem The 16384 is the "magic" constant that Hide/ShowDitem use to move the item rect offscreen. A later version of the program had the Dialog modeless and yet a later version got rid of the Dialog all together and used a Window and the TE manager directely. This turned out to include just as much code and was MUCH easier to maintain and read. One interesting aspect was that I had TWO such small spreadsheets on a single window. There are some strange problems associated with using the List Manager for this sort of thing, but nothing that can't be solved (I.e. not bugs, just funny ways of doing it). BTW, to all those that fear using the List Manager, especially in Dialogs, there is NOTHING TO IT! The List Manager has to be one of the simplest and nicest Managers in the Mac. The only problems I have have to do with the LActivate procedure and the lack of means of getting it called for a Modal Dialog (in case an Alert pops up above it). This is an esthetic problem, not a functional one. - Yossie -- Yossie Silverman What did the Caspian sea? National Semiconductor Ltd. (Israel) cyosta%taux01@nsc.nsc.COM or RPR1YOS@TECHNION.BITNET NSA LSD FBI KGB PCP CIA MOSAD NUCLEAR MI5 SPY ASSASSINATE SDI -- OOLCAY ITAY