PRB: Phantom Grid Column Displayed After Moving to Last Column

Last reviewed: December 31, 1996
Article ID: Q132365
The information in this article applies to:
  • Microsoft Visual FoxPro for Windows, version 3.0

SYMPTOMS

When you press the TAB key to move across a row in a grid, after moving into the last column, the mouse pointer jumps one column to the left and displays a phantom column.

For example, this happens when the grid has these properties:

   .ColumnCount = 4
   .RecordMark = .F.
   .DeleteMark = .F.
   .ScrollBars = 0
   .Width = 400
   .Column1.Width = 100
   .Column2.Width = 100
   .Column3.Width = 100
   .Column4.Width = 100

RESOLUTION

To suppress the horizontal scrolling effect and the display of a phantom column after the last column, set the grid's Width property to a value that causes the right border of the grid to be displayed in a thicker (bolder) line. This makes the edge of the right-most column the same as the border of the grid.

For example, add seven to the sum of the column widths in the example given in the "Symptoms" section of this article. This suppresses the horizontal scrolling effect:

   .ColumnCount = 4
   .RecordMark = .F.
   .DeleteMark = .F.
   .ScrollBars = 0
   .Width = 407          && Add 7 to the sum of the column widths
   .Column1.Width = 100
   .Column2.Width = 100
   .Column3.Width = 100
   .Column4.Width = 100

The addition of seven pixels to the sum of the column widths is based on the number of vertical lines in the grid, which includes the right border of the grid. When the grid's Width property is set to 407, the right border of the grid is shown in bold in the Form Designer. When the form is executed, you will not be able to press the TAB key or the CTRL-TAB to move past the last column so that the horizontal scrolling of the grid display will not occur.

STATUS

This behavior is by design.


KBCategory: kbui kbprb
KBSubcategory: FxotherGeneral
Additional reference words: 3.00 VFoxWin


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: December 31, 1996
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.