FIX: Window Coordinates Differ Between BROWSE/ACTIVATE WINDOW

ID: Q119903

2.50b 2.50c MACINTOSH kbprg kbfixlist kbbuglist

The information in this article applies to:

SYMPTOMS

A window defined at specific coordinates and then activated will be in a slightly different position than the same window defined and used with the BROWSE WINDOW <window name> command.

CAUSE

This behavior is caused by having MACDESKTOP turned ON when the BROWSE WINDOW <window name> command is issued.

RESOLUTION

SET MACDESKTOP OFF before issuing the BROWSE WINDOW <window name> command. MACDESKTOP can be turned back on after the BROWSE command if desired.

STATUS

Microsoft has confirmed this to be a problem in FoxPro 2.5b and 2.5c for Macintosh. This problem was corrected in FoxPro 2.6a for Macintosh.

MORE INFORMATION

Steps to Reproduce Problem

1. Issue the following commands to change the screen font to FoxFont, 9

   point, open the SALESMAN table and set MACDESKTOP on (the default):

      MODIFY WINDOW SCREEN FONT "FoxFont", 9
      USE SYS(2027,SYS(2004))+"TUTORIAL:SALESMAN"
      SET MACDESKTOP ON

2. From the Program menu, choose Debug. Type the following functions in the
   left half of the Debug window, each on a separate line:

      WLCOL()
      WLROW()
      WLCOL("Salesman")
      WLROW("Salesman")

3. Define a window called TEST and activate it with the following commands:

      DEFINE WINDOW test AT 5,3 SIZE 10,50 TITLE "Test"
      ACTIVATE WINDOW test

4. Bring the Debug window forward. Note that WLROW() is 5 and WLCOL() is 3.
   These are the coordinates that were used in the DEFINE WINDOW command.

5. Release the window called TEST with the following command:

      RELEASE WINDOW test

6. Define the TEST window again (only this time without the title) and use
   it for the BROWSE of the Salesman table. Use the following commands:

      DEFINE WINDOW test AT 5,3 SIZE 10,50
      BROWSE WINDOW test

7. Bring the Debug window forward. Note that WLROW("Salesman") is 2.889 and
   WLCOL("Salesman") is 2.857. The Browse window is positioned above and
   slightly to the left of the window that was just activated, even though
   both windows were defined with the same coordinates.

8. Repeat steps 1 through 7, but use SET MACDESKTOP OFF in step 1. Note
   that the position of the activated window is the same as when MACDESKTOP
   was on. The WLROW("Salesman") and WLCOL("Salesman") functions in the
   Debug window should now have the same coordinates as the activated
   window.

REFERENCES

"Language Reference," version 2.5 pages 159-163, 205-222, 362-372, 753-754, 858, 868, 905-906

Additional reference words: FoxMac 2.50b 2.50c fixlist2.60a buglist2.50b buglist2.50c KBCategory: kbprg kbfixlist kbbuglist KBSubcategory: Solution Type : kbfix

Last Reviewed: October 20, 1997