FIX: FixedCols Can Cause Paint Problem with Grid Control (95429)



The information in this article applies to:

  • Microsoft Visual Basic Standard Edition for Windows 2.0
  • Microsoft Visual Basic Professional Edition for Windows 2.0

This article was previously published under Q95429

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
				

Modification Type:MajorLast Reviewed:10/29/2003
Keywords:kbbug kbfix KB95429