FastTips for FoxPro for Windows: Screen Builder Q&A

ID: Q96174

2.50 WINDOWS kbprg kbtool kbfasttip kbappnote Appnote

The information in this article applies to:

  Microsoft(R) Technical Support Application Note (Text File)
             FW0933: SCREEN BUILDER QUESTIONS AND ANSWERS
                                                  Revision Date: 10/93
                                                      No Disk Included

The following information applies to Microsoft FoxPro(R) version 2.5 for Windows(TM).

| INFORMATION PROVIDED IN THIS DOCUMENT AND ANY SOFTWARE THAT MAY     |
| ACCOMPANY THIS DOCUMENT (collectively referred to as an Application |
| Note) IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER      |
| EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED      |
| WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR       |
| PURPOSE. The user assumes the entire risk as to the accuracy and    |
| the use of this Application Note. This Application Note may be      |
| copied and distributed subject to the following conditions:  1) All |
| text must be copied without modification and all pages must be      |
| included;  2) If software is included, all files on the disk(s)     |
| must be copied without modification (the MS-DOS(R)  utility         |
| diskcopy is appropriate for this purpose);  3) All components of    |
| this Application Note must be distributed together;  and  4) This   |
| Application Note may not be distributed for profit.                 |
|                                                                     |
| Copyright (C) 1993 Microsoft Corporation.  All Rights Reserved.     |
| Microsoft, FoxPro, and MS-DOS are registered trademarks and Windows |
| is a trademark of Microsoft Corporation.                            |
|---------------------------------------------------------------------|

1. Q. I don't own a mouse. How can I use the tools to create a screen
       using the keyboard?

    A. You cannot; a mouse is required to create a screen with the
       Screen Builder.

2. Q. The Field dialog box in the Screen Design window only allows me
       to create either an input field (a GET) or an output field (a
       SAY). What happened to the Edit Field option in the Field
       dialog box?

    A. The Edit Field option is now part of the new Edit Region dialog
       box. To create an edit field, click the Edit Region tool
       located on the left side of the Screen Design window. Note that
       as you select the tool, a brief description appears in the
       status bar at the bottom of the screen.

       In the Edit Region dialog box, the Select On Entry and
       Initially Disable Edit Region options are new. For additional
       information on these options, see the help topic "Edit Region
       Dialog."

3. Q. When I select the Push Button tool, I have a choice of three
       button options: Normal, Invisible, and Picture. Were these
       options available in FoxPro version 2.0?

    A. The preexisting Invisible Button and Push Button options were
       consolidated into a single dialog box in FoxPro for Windows.
       The Picture type push button is new. You can create push
       buttons using bitmap (.BMP) picture files to graphically depict
       actions that will be initiated when particular buttons are
       selected. Picture files can also be used with option (radio)
       buttons and check boxes in FoxPro for Windows.

4. Q. I know how to click and drag objects on the screen using the
       Selection Pointer tool. Is there an easier way to move objects
       a small distance?

    A. Yes. Select the object to be moved using the Selection Pointer
       tool. Once the object is selected, use the arrow keys to move
       the object a pixel at a time.

5. Q. I have created a screen for my application that displays a
       number of fields. After creating the application, I used the
       keyboard to step through the fields in this screen. The order
       in which the fields were accessed was not what I expected based
       on the physical arrangement of the fields. How can I change the
       order in which the fields are accessed without changing their
       physical position?

    A. To accomplish this, return to your original screen. In the
       Screen Builder, choose Object Order from the Screen menu. This
       option opens the Object Order dialog box. Screen objects are
       listed according to their order of accessibility with the
       keyboard. To change the access order for the objects, click the
       button to the left of the object and drag the object to its new
       keyboard access position. When you are finished, rebuild your
       application to include the new field-access order.

6. Q. When I generated screens in FoxPro version 2.0, I was able to tell
       the screen generator exactly what code to generate, such as opening
       and closing files and defining or releasing windows and modal
       screens. Is this option still available? I can't seem to find
       these options.

    A. Yes. In the Generate Screen dialog box, note that there is a
       More button. Choose this button and the dialog box expands to
       display the generate code options.

7. Q. The Color command is no longer on the Screen menu. How can I
       specify colors for my screen objects?

    A. To specify colors, first select the screen object or a group of
       objects. To modify the background color of the object, choose
       Fill Color from the Object menu. To modify the outline and text
       of an object, choose Pen Color from the Object menu.

        NOTE: The AUTOMATIC setting matches the Windows' color sets.

       To change the background of the entire screen, choose Layout
       from the Screen menu and click the Color option. You may choose
       a specific color or select a wallpaper pattern by clicking
       Wallpaper and specifying a .BMP file.

8. Q. I have tried using an @ ... SAY command to display the contents
       of a general field. No matter what I do, nothing appears. What
       am I doing wrong?

    A. General fields are used to display OLE objects. Therefore, to
       display the contents of a general field, use the Picture tool.
       The Field tool cannot display pictures.

9. Q. I used the Picture tool to place a picture field on my screen
       and specified the appropriate .BMP file. Can you please explain
       how the Clip Picture, Scale Picture - Retain Shape, and Scale
       Picture - Fill The Frame options in the If Picture And Frame
       Different Size group affect the display of the picture?

    A. Bear in mind that the following options apply only when the
       picture and frame are different sizes:

        - Choose the Clip Picture option if you want to retain the
          original dimensions of the picture. If the picture is larger
          than the frame, only a portion of the image will be displayed,
          beginning with the top-left portion of the picture. Any portion
          of the picture that extends beyond the frame will be hidden.

        - Choose the Scale Picture - Retain Shape option if you want to
          retain the overall shape of the picture but fill as much of the
          frame as possible. The picture will be protected from vertical
          or horizontal distortion.

        - Choose the Scale Picture - Fill The Frame option if you want to
          fill the frame completely. The picture will be horizontally or
          vertically distorted as needed to fill the frame.

10. Q. I want to create a screen that allows online editing of OLE
       objects stored in a general field while a READ command is
       active. I have tried including a picture in my screen using the
       Picture tool, but I am not able to edit the displayed .BMP
       file. Is there a way to do this?

    A. Yes. Use the Field tool to create a general field in your
       screen. Select the WHEN clause and enter the command MODIFY
       GENERAL FLDNAME in the code snippet area as a procedure. Save
       the screen changes and regenerate your screen and/or
       application. Now you will be able to edit the bi(((TM)))ap
       within the screen when the application is running.

11. Q. Why can't I type as many characters in an input field as will
       physically fit?

    A. In a proportional font, each character is given as much
       vertical space as it needs and no more. For example, a
       lowercase "f" requires much less space than an uppercase "W."
       When an input field is placed on a screen, FoxPro calculates
       the width of the field by taking the number of characters in
       the database field times the average size of a character in the
       specified font. If the field is filled with wider-than-average
       characters, the characters will not all fit in the input field,
       and so the characters scroll. If the field is filled with
       narrower-than-average characters, the characters will not
       appear to fill the input field.

12. Q. How do I control the length of a memory variable (or "memvar")
       independent of the size of an input field?

   A.  Use a PICTURE clause to control the memory variable's length in
       conjunction with a SIZE clause to control the width of the
       input field.

Additional reference words: FoxWin 2.50 ivrfax fasttips appnote KBCategory: kbprg kbtool kbfasttip kbappnote KBSubcategory: FxinteropOle
Keywords          : FxinteropOle 
Version           : 2.50
Platform          : WINDOWS

Last Reviewed: December 13, 1996