ID: Q111669
2.50 2.50a 2.50b | 2.00 2.50 2.50a 2.50b | 2.50b
WINDOWS | MS-DOS | MACINTOSH
kbui
The information in this article applies to:
Many applications use confirmation screens that present the user with push buttons to answer a question.
The steps below describe how to use the Screen Builder to create a confirmation screen containing Yes and No push buttons.
1. Type the following in the Command window to start the Screen
Builder:
CREATE SCREEN
2. Place a text field on the screen. (In FoxPro for Windows or FoxPro
for Macintosh, select the Text tool from the toolbox. In FoxPro for
MS-DOS, choose Text from the Screen menu.)
3. In the text field, type the question asked of the user. For this
example, type the following:
Save changes?
4. Place a push button on the screen. (In FoxPro for Windows or FoxPro
for Macintosh, select the Push Button tool from the toolbox. In
FoxPro for MS-DOS, choose Push Button from the Screen menu.)
5. Under Push Button Prompts, type "\!\<Yes" (without the quotation
marks)in the first column.
NOTE: The backslash and exclamation mark characters (\!) at the
beginning of the push button prompt designate this push button as
the default. The backslash and less-than characters (\<|) in front
of the letter Y designate Y as the access key (also known as a hot
key.)
6. Move down to the second row under Push Button Prompts. Type
"\?\<No" (without the quotation marks) in the second prompt area.
NOTE: the backslash and question mark characters (\?) at the
beginning of the push button prompt designate it as the escape or
cancel push button. The backslash and less-than characters (\<|)
in front of the letter N designate N as the access key.
7. In the Variable text box, type "m.confbtn" (without the quotation
marks).
8. Under Clauses, choose Valid.
9. Verify that the Procedure radio button is selected, then type the
following in the text editing region:
IF m.confbtn = 1
* Place the code performed when "Yes" is chosen here.
ELSE
* Place the code performed when "No" is chosen here.
ENDIF
CLEAR READ
10. Choose OK twice to return to the Screen Design window.
11. From the Program menu, choose Generate.
12. When prompted to save changes to the screen, choose Yes, then save
the screen with the name TEST.
13. When prompted to save environment information, choose No.
14. In FoxPro for Windows and FoxPro for Macintosh, choose the More
button in the Generate Screen dialog box to view all Generate options.
(FoxPro for MS-DOS automatically displays all Generate options.)
15. Clear the Open Files and Close Files check boxes.
16. Choose the Generate button.
17. Run TEST.SPR to test the screen.
NOTE: If the screen appears briefly, then clears before a push button has been selected, add the following code to the screen's Setup snippet in order to initialize the push button variable:
m.confbtn = 1
Additional reference words: FoxMac FoxDos FoxWin 2.00 2.50 2.50a 2.50b ok
cancel
KBCategory: kbui
KBSubcategory: FxtoolSbuilder
Keywords : kbcode FxtoolSbuilder
Version : 2.50 2.50a 2.50b | 2.00 2.50 2.5
Platform : MACINTOSH MS-DOS WINDOWS
Last Reviewed: May 22, 1998