The information in this article applies to:
- Microsoft FoxPro for Windows, versions 2.5x, 2.6, 2.6a
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.
- From the File menu, choose New.
- In the File Type dialog box, select Screen, and choose the New button.
- When the UNTITLED.SCX screen appears, select the Picture tool at the
bottom of the toolbox.
- 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.
- Click the Button tool, and place a push button on the top-left corner of
the picture.
- 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.
- Resize the button so that it covers almost the whole picture.
- Save the screen as TEST.SCX and generate TEST.SPR.
- 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.
|