FIX: FixedCols Can Cause Paint Problem with Grid Control

Last reviewed: October 30, 1997
Article ID: Q95429
2.00 WINDOWS kbprg kbbuglist

The information in this article applies to:

  • The Standard and Professional Editions of Microsoft Visual Basic for Windows, version 2.0

SYMPTOMS

Sometimes if the FixedCols property of the GRID.VBX control is set while designing a form, paint problems can occur when the program is run.

WORKAROUND

To work around the problem, set the FixedCols property in code rather than at design time.

STATUS

Microsoft has confirmed this to be a problem in both the Standard and Professional Editions of Microsoft Visual Basic version 2.0 for Windows. This problem was corrected in Microsoft Visual Basic version 3.0 for Windows.

MORE INFORMATION

This problem appears to happen when the FixedRows property is set to 1 and the FixedCols property is set to something other than 0 or 1. This problem occurs only when you set properties at design time.

Steps to Reproduce Problem

  1. Start Visual Basic.

  2. From the File menu, choose Add File and add the GRID.VBX custom control.

  3. Place a grid control on the form.

  4. In the Properties Window, set the Cols property to 3 and the FixedCols property to 2.

  5. Run the program.

You should notice some paint problems with the grid control. The grid continues to paint incorrectly until you set the FixedCols property back to 0 or 1 and run the program again.

To avoid the problem, set the FixedCols property at runtime in code:

   grid1.FixedCols = 2


Additional reference words: buglist2.00 fixlist3.00 2.00 3.00
KBCategory: kbprg kbbuglist
KBSubcategory: PrgCtrlsCus
Solution Type : kbfix


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: October 30, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.