ID: Q111918
2.50 2.50a 2.50b | 2.00 2.50 2.50a 2.50b | 2.50b
WINDOWS          | MS-DOS                | MACINTOSH
The information in this article applies to:
It is often desirable to enable one check box while disabling the others on a screen. By enabling only one check box and disabling the others, the color of the disabled ones will change and become dimmed. This will emphasize that only one of these check boxes can be selected at any given time.
See the procedure below for a demonstration of how to accomplish this.
Below are the steps to create the check boxes:
1. Open the Screen Builder and select the Check Box tool. (In FoxPro for
   MS-DOS, choose Check Box from the Screen menu.)
   variable check1, the second one having the variable check2, and the
   third one having the variable check3.
      IF check1=1
         SHOW GET check2 DISABLED
         SHOW GET check3 DISABLED
      ELSE
         SHOW GET check2 ENABLED
         SHOW GET check3 ENABLED
      ENDIF
      IF check2=1
         SHOW GET check1 DISABLED
         SHOW GET check3 DISABLED
      ELSE
         SHOW GET check1 ENABLED
         SHOW GET check3 ENABLED
      ENDIF
      IF check3=1
         SHOW GET check1 DISABLED
         SHOW GET check2 DISABLED
      ELSE
         SHOW GET check1 ENABLED
         SHOW GET check2 ENABLED
      ENDIF
The variables check1, check2, and check3 will always have a value of 0 or 1. Therefore, when the variable is evaluated, this is how the IF statement is used enable or disable the check boxes.
Additional reference words: FoxMac FoxDos FoxWin 2.00 2.50 2.50a 2.50b checkbox KBCategory: kbprg KBSubcategory: FxtoolSbuilder
Keywords          : FxtoolSbuilder 
Version           : 2.50 2.50a 2.50b | 2.00 2.50 2.5
Platform          : MACINTOSH MS-DOS WINDOWSLast Reviewed: May 1, 1996