How to Enable One Check Box While Disabling the OthersID: Q111918 2.50 2.50a 2.50b | 2.00 2.50 2.50a 2.50b | 2.50b kbprg
The information in this article applies to:
SUMMARYIt 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.
MORE INFORMATIONBelow are the steps to create the check boxes: 1. Open the Screen Builder and select the Check Box tool. (In FoxPro for 2. Create three check boxes on the screen with the first one having the
3. In the VALID clause of the first check box, type in this code:
4. In the VALID clause of the second check box, type in this code:
5. In the VALID clause of the third check box, type in this code:
After generating the screen and running it, click one of the check boxes.
When one box is selected, the others will be disabled. To enable all the
check boxes, click the box that is selected (the one that has an "X" in
it). This will clear the box and make all the check boxes enabled until
another check box is selected.
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
|
|
Last Reviewed: May 1, 1996 © 1999 Microsoft Corporation. All rights reserved. Terms of Use. |