home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #18 / NN_1992_18.iso / spool / comp / sys / mac / programm / 14052 < prev    next >
Encoding:
Text File  |  1992-08-15  |  1.1 KB  |  25 lines

  1. Newsgroups: comp.sys.mac.programmer
  2. Path: sparky!uunet!news.claremont.edu!ucivax!noiro.acs.uci.edu!network.ucsd.edu!pacbell.com!well!oster
  3. From: oster@well.sf.ca.us (David Phillip Oster)
  4. Subject: Re: Disabling Access to Edit Text Items?
  5. Message-ID: <Bt291s.qp@well.sf.ca.us>
  6. Sender: news@well.sf.ca.us
  7. Organization: Whole Earth 'Lectronic Link
  8. References: <Bt1u2r.I2H@gpu.utcs.utoronto.ca>
  9. Date: Sun, 16 Aug 1992 05:10:39 GMT
  10. Lines: 13
  11.  
  12. In article <Bt1u2r.I2H@gpu.utcs.utoronto.ca> farm@gpu.utcs.utoronto.ca (B. Munroe) writes:
  13. >what is the best way to disable access to an edit text item in a dialog
  14.  
  15. I do a GetDItem, SetDItem to change the type from an edittext item to
  16. a static text item. This solves the problem of the tab key trying to
  17. make it the active field. I do a SelIText if necessary first to make be
  18. a non-active field.
  19.  
  20. My update procedure does the following after the system has drawn the 
  21. static text items:
  22. Paintrect() with patBic as the PenMode, and "gray" as the PenPat. This
  23. grays out the text.  Then I draw an appropriate FrameRect around the
  24. static text item so it looks like a grayed out edittext item.
  25.