FIX: Grid Custom Control RemoveItem Does Not Update RowHeightLast reviewed: October 30, 1997Article ID: Q85436 |
1.00 2.00
WINDOWS
kbprg kbbuglist
The information in this article applies to: - Professional Edition of Microsoft Visual Basic for Windows, version 2.0 - Microsoft Professional Toolkit for Microsoft Visual Basic programming system for Windows, version 1.0
SYMPTOMSIf you change the RowHeight property of a Grid control, and then delete a row by using the RemoveItem method, the grid adjusts the height of the rows below the deleted row to their default size. However, it does not update the RowHeight property for those rows. If you reset the RowHeight property to its current value, the Grid does not re-draw the rows to the size given by RowHeight.
WORKAROUNDTo work around the problem, set RowHeight to a different value and then change it back to the original value. For example, replace the code shown in the Command1 Click event in step 6 of the More Information section below with this code:
Sub Command1_Click () For count% = 0 To Grid1.Rows - 1 Grid1.RowHeight(count%) = 399 Next count% For count% = 0 To Grid1.Rows - 1 Grid1.RowHeight(count%) = 400 Next count% End Sub STATUSMicrosoft has confirmed this to be a bug in the Grid custom control supplied with the products listed above. This problem was corrected in the Grid custom control shipped with Microsoft Visual Basic version 3.0 for Windows.
MORE INFORMATION
Steps to Reproduce Problem
|
Additional reference words: buglist1.00 buglist2.00 fixlist3.00 1.00 2.00
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |