home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #18 / NN_1992_18.iso / spool / comp / lang / pascal / 4836 < prev    next >
Encoding:
Text File  |  1992-08-13  |  1.3 KB  |  35 lines

  1. Newsgroups: comp.windows.ms.programmer,comp.lang.pascal
  2. Path: sparky!uunet!usc!cs.utexas.edu!tamsun.tamu.edu!gergo.tamu.edu!chris
  3. From: chris@gergo.tamu.edu (Chris King)
  4. Subject: Re: Disabling Autoradiobuttons at run time - TPW
  5. Message-ID: <13AUG199209371119@gergo.tamu.edu>
  6. News-Software: VAX/VMS VNEWS 1.41    
  7. Keywords:  Buttons TPW
  8. Sender: news@tamsun.tamu.edu (Read News)
  9. Organization: Geochemical and Environmental Research Group - TAMU
  10. References: <dekock.713691787@shannon>
  11. Date: Thu, 13 Aug 1992 15:37:00 GMT
  12. Lines: 21
  13.  
  14. In article <dekock.713691787@shannon>, dekock@shannon.ee.wits.ac.za (Nick de Kock) writes...
  15. >I have an application in which I require the selection of 1 out of 
  16. >a series of options. Depending on certain conditions some of these
  17. >options are unavailable at certain times. I need to disable certain
  18. >of the buttons. 
  19.  
  20. What you can do is set a boolean that refers to the status of the button,
  21. and in your methods that are called when you press that button, place a
  22. line like 
  23.  
  24.    if buttondisabled then exit;
  25.  
  26. I know this works, since I use it.  There are also ways of destroying the
  27. button (since it is after all just another window) or hiding it, you may
  28. even be able to dynamically change it's ID and that would disable it's
  29. associated methods, then change it back when you need it again. 
  30.  
  31. I use the rather brutal approach of a boolean.
  32.  
  33. Chris King
  34.  
  35.