Editing General Fields in FoxPro Screen Builder

ID: Q95303

2.5x 2.60 2.60a WINDOWS kbprg

The information in this article applies to:

SUMMARY

A general field cannot be used as a GET field in the Screen Builder. The Screen Builder will automatically generate an @ ... SAY command when the Picture tool is chosen to place a picture on the screen form. To allow editing of the general field, create an invisible button with a VALID clause on top of the picture, as illustrated below.

MORE INFORMATION

The following example assumes that there is an open database named TEST.DBF that contains a general field named PICT.

1. From the File menu, choose New.

2. In the File Type dialog box, select Screen, and choose the New button.

3. When the UNTITLED.SCX screen appears, select the Picture tool at the

   bottom of the toolbox.

4. In the Screen Picture dialog box, select the Field radio button, choose
   the Field command button, and select PICT from the Field list. Choose OK
   twice to return to the Screen Builder.

5. Click the Button tool, and place a push button on the top-left corner of
   the picture.

6. In the Type box, select Invisible, give the button a name in the
   Variable prompt, select the Valid Clause button, and in the code snippet
   window, type "MODIFY GENERAL PICT" (without the quotation marks). Choose
   OK twice to return to the Screen Builder.

7. Resize the button so that it covers almost the whole picture.

8. Save the screen as TEST.SCX and generate TEST.SPR.

9. Run TEST.SPR and the screen will appear. Double-clicking the picture

   will invoke the general field window and the existing picture may be
   edited, cleared, or replaced with a new picture.

Additional reference words: FoxWin 2.50 2.50a 2.50b 2.60 2.60a bit map bmp pcx KBCategory: kbprg KBSubcategory: FxtoolSbuilder
Keywords          : FxtoolSbuilder 
Version           : 2.5x 2.60 2.60a
Platform          : WINDOWS

Last Reviewed: April 30, 1996