mcdonald@fornax.UUCP (Ken Mcdonald) (03/11/90)
Well, as the title says I have a situation where I want to change an editText item to a statText item. Fine. There was a brief discussion of this a short time ago, and several people pointed out that the tricky part was what to do if the editText item being changed is the currently selected item. I agree. If there is more than one editText item, the solution seems obvious--just use SelIText() to select one of the others, before changing the current one. But what do you do if the one you are working on is the only editText item? I tried setting the editFields field of the dialog record to -1, to tell it there were no longer any valid editText items, but nonetheless, when I typed in a character, TE put it up there on the screen where my editable item "used to" be. What I'm assuming is that ModalDialog() takes incoming characters and uses TE routines to place them in the active edit item. So the question is, how do I inform ModalDialog that there really is no active edit item? Do I have to go and muck around with the TERec? I've tried a number of things now, to no avail. Thanks for any help, Ken McDonald mcdonald@cs.sfu.ca
bowman@reed.UUCP (Eric Bowman) (03/12/90)
In article <419@fornax.UUCP> mcdonald@fornax.UUCP (Ken Mcdonald) writes: >But what >do you do if the one you are working on is the only editText item? The way I handle this is to put another editText item way out of the dialog's visRgn. You'll need to do some trickery in a filterproc to make things work out ok, but when you want to disable your editText, you just select the other, non-visible editText item first. Hope this helps, boBO bowman@reed.{bitnet,UUCP,edu}
kazim@Apple.COM (Alex Kazim) (03/13/90)
In article <14401@reed.UUCP> bowman@reed.UUCP (Eric Bowman) writes: >In article <419@fornax.UUCP> mcdonald@fornax.UUCP (Ken Mcdonald) writes: >>But what >>do you do if the one you are working on is the only editText item? > >The way I handle this is to put another editText item way out of the >dialog's visRgn. You'll need to do some trickery in a filterproc to Have you tried _HideDItem on the edit text item. The Dialog Manager may do the correct thing, even if it's the only edit text around. ================================================================== Alex Kazim, Apple Computer ==================================================================