Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!think.com!paperboy!snorkelwacker!bloom-beacon!eru!hagbard!sunic!kth.se!cyklop.nada.kth.se!mattiasb From: mattiasb@nada.kth.se (Mattias Berglund) Newsgroups: comp.sys.mac.programmer Subject: Re: Editable Text Objects in Dialog Boxes Summary: Password fields made simple Message-ID: <1990Sep7.112647.11077@nada.kth.se> Date: 7 Sep 90 11:26:47 GMT References: <1990Aug17.171302.8900@Neon.Stanford.EDU> <4X6NVMD@cs.swarthmore.edu> Organization: Royal Institute of Technology, Stockholm, Sweden Lines: 14 An easy way to have a password field in a modal dialog is to modify the Quickdraw bottleneck procedures StdText and StdTxMeas of the Dialog- Record in question. If the text to draw or measure is the one to be protected, the procedure simply draws or measures bullets (or whatever), otherwise it draws the requested text. The tricky part is knowing if the text is that of the protected field. My solution is to save the handle of the desired field (as returned by GetDItem) in a global variable. Later I can check if the pointer passed as an argument falls within this handle. Mattias Berglund mattiasb@cyklop.nada.kth.se