Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!ames!haven!umd5!zben From: zben@umd5.umd.edu (Ben Cranston) Newsgroups: comp.sys.mac.programmer Subject: Re: Set/GetDItem (was Re: Moving a Textedit field in a modal dialog) Summary: I don't think one should move a control with SetDItem Message-ID: <5240@umd5.umd.edu> Date: 21 Aug 89 20:00:40 GMT References: <15088@dartvax.Dartmouth.EDU> <21428@cup.portal.com> <58078@tut.cis.ohio-state.edu> <456@gargoyle.uchicago.edu> Reply-To: zben@umd5.umd.edu (Ben Cranston) Organization: University of Maryland, College Park Lines: 23 In article <456@gargoyle.uchicago.edu> dawyd@gargoyle.uchicago.edu.UUCP (David Walton) writes: > As to changing or moving controls: IM I-422 says to not change or move > the SETTING of a control (i.e., dials, stuff like that). What that > means is that you should use the Control Manager calls to change the > settings of controls (by coercing the itemhandles returned by GetDItem > to controlhandles)... I believe some complex controls (like scroll bars) have precomputed regions associated with them (like the thumb region). If so, it would not be a good idea to try to move the control by using SetDItem to change the control's rectangle. I always tested for the control bit and called MoveControl. I would quote some code but when I went back to look at that app I evidently dropped my own code in favor of using the HideDItem/ShowDItem suite... > ...And editText and statText items, I believe,are not technically controls. As I read IM, this are correct, so the original poster's problem must have been something else. -- Sig DS.L ('ZBen') ; Ben Cranston * Computer Science Center Network Infrastructures Group * University of Maryland at College Park