Path: utzoo!attcan!uunet!aplcen!haven!wam!nebel From: nebel@wam.umd.edu (Chris D. Nebel) Newsgroups: comp.sys.mac.programmer Subject: Re: Deselecting an editText item ina dialog box? Message-ID: <1990Mar1.170635.29828@wam.umd.edu> Date: 1 Mar 90 17:06:35 GMT References: Sender: usenet@wam.umd.edu (USENET Posting) Reply-To: nebel@wam.umd.edu (Chris D. Nebel) Distribution: na Organization: University of Maryland at College Park Lines: 20 In article dave@sun.soe.clarkson.edu writes: > >Is there any way to disable an editText item in a dialog box? For >example, I have an editText box which I want to lock out from user >changes once a particular option is selected. Seems simple, but I >haven't seen anything in IM or elsewhere which says it can be done.. I once wrote a dialog with a single editText item which I disabled by using a filterProc. It would check for clicks on the item and keyDown events; if it saw any, it would change the itemHit to zero, and return true, i.e., lie and say "Yes, I've handled this event." With a bit of work, this technique could (I think :) be extended to work with multiple editText items, but I haven't had to do this yet, so I'm not quite sure how. If someone knows an elegant solution, I'd like to know too! Chris Nebel nebel@wam.umd.edu