home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #26 / NN_1992_26.iso / spool / comp / sys / mac / programm / 18104 < prev    next >
Encoding:
Internet Message Format  |  1992-11-08  |  3.9 KB

  1. Path: sparky!uunet!gatech!news.byu.edu!hamblin.math.byu.edu!sol.ctr.columbia.edu!usc!zaphod.mps.ohio-state.edu!pacific.mps.ohio-state.edu!linac!att!ucbvax!ucdavis!taquito.engr.ucdavis.edu!cklarson
  2. From: cklarson@taquito.engr.ucdavis.edu (Christopher Klaus Larson)
  3. Newsgroups: comp.sys.mac.programmer
  4. Subject: Re: Dimming dialog items/controls.  How?
  5. Message-ID: <18986@ucdavis.ucdavis.edu>
  6. Date: 6 Nov 92 22:21:25 GMT
  7. References: <1992Nov03.151803.19448@bnr.ca> <chuck-031192125135@choffman.gte.com>
  8. Sender: usenet@ucdavis.ucdavis.edu
  9. Organization: College of Engineering - University of California - Davis
  10. Lines: 86
  11.  
  12. In article <chuck-031192125135@choffman.gte.com> chuck@gte.com (Chuck Hoffman) writes:
  13. >In article <1992Nov03.151803.19448@bnr.ca>, brunner@crchh447.bnr.ca (James
  14. >Brunner) wrote:
  15. >> 
  16. >> This may be a stupid question, but how do you dim an item in a dialog box?
  17. >> (Specifically check boxes and radio buttons).  I have tried enabling/disabling
  18. >> the items like:
  19. >> 
  20. >> [... code for enabling/disabling the item ...]
  21. >> 
  22. >> I have also tried having some items disabled using ResEdit to set/clear the
  23. >> "enabled" bit.
  24. >> 
  25. >> But, neither of these methods dim the item.  They only stop it from getting
  26. >> clicks.  What am I doing wrong?  Thanks.  Please respond by e-mail.
  27.  
  28. Enabling/Disabling an item only determines whether ModalDialog will
  29. return if the item is hit -- it does not effect the item's appearence
  30. or other functions. For example, most editText items are disabled. This
  31. means that the user can type into the item without ModalDialog returning
  32. mouseDowns or keyHits in the item. See the Dialog Manager chapter in IM I
  33. for further information.
  34.  
  35. >
  36. >Try using HiliteControl function of the Control Manager.  I've not tried
  37. >HiliteControl with the Dialog Manager, but it might work.  Let me know.
  38. >
  39.  
  40. Use GetDItem to obtain a handle to the control, coerce the handle to type
  41. ControlHandle and call HiliteControl with a hiliteValue of $FF. In THINK C:
  42.  
  43.   GetDItem (the_dialog,item_number,&item_type,&item_handle,&item_rect);
  44.   HiliteControl ((ControlHandle)item_handle,0xFF);
  45.  
  46. This method will only work for controls (so check boxes and radio buttons
  47. are ok), hence the name HiliteControl.
  48.                               ^^^^^^^
  49. HiliteControl is described in the Control Manager section of IM I.
  50.  
  51. --Chris
  52. cklarson@engr.ucdavis.edu
  53.  
  54. Newsgroups: comp.sys.mac.programmer
  55. Subject: Re: Dimming dialog items/controls.  How?
  56. Summary: 
  57. Expires: 
  58. References: <1992Nov03.151803.19448@bnr.ca> <chuck-031192125135@choffman.gte.com>
  59. Sender: 
  60. Followup-To: 
  61. Distribution: 
  62. Organization: College of Engineering - University of California - Davis
  63. Keywords: 
  64.  
  65. In article <chuck-031192125135@choffman.gte.com> chuck@gte.com (Chuck Hoffman) writes:
  66. >In article <1992Nov03.151803.19448@bnr.ca>, brunner@crchh447.bnr.ca (James
  67. >Brunner) wrote:
  68. >> 
  69. >> This may be a stupid question, but how do you dim an item in a dialog box?
  70. >> (Specifically check boxes and radio buttons).  I have tried enabling/disabling
  71. >> the items like:
  72. >> 
  73. >> [... code for enabling/disabling the item ...]
  74. >> 
  75. >> I have also tried having some items disabled using ResEdit to set/clear the
  76. >> "enabled" bit.
  77. >> 
  78. >> But, neither of these methods dim the item.  They only stop it from getting
  79. >> clicks.  What am I doing wrong?  Thanks.  Please respond by e-mail.
  80. >
  81. >Try using HiliteControl function of the Control Manager.  I've not tried
  82. >HiliteControl with the Dialog Manager, but it might work.  Let me know.
  83. >
  84.  
  85. Use GetDItem to obtain a handle to the control, coerce the handle to type
  86. ControlHandle and call HiliteControl with a hiliteValue of $FF. In THINK C:
  87.  
  88.   GetDItem (the_dialog,item_number,&item_type,&item_handle,&item_rect);
  89.   HiliteControl ((ControlHandle)item_handle,0xFF);
  90.  
  91. This method will only work for controls (so check boxes and radio buttons
  92. are ok), hence the name HiliteControl.
  93.                               ^^^^^^^
  94. HiliteControl is described in the Control Manager section of IM I.
  95.  
  96. --Chris
  97. cklarson@engr.ucdavis.edu
  98.