FIX: Focus Rectangle Remains When Grid Loses Focus (95514)
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 Q95514 SYMPTOMS
When a grid control loses focus, the focus rectangle surrounding the
active cell incorrectly remains on the cell.
This behavior differs from that of the grid control that shipped with
the Professional Toolkit for Visual Basic version 1.0. The active cell,
with the focus rectangle, can be differentiated from other cells in the
grid by its wider border when GridLines is set to True or by the fact
that it is the only cell with a border when GridLines is set to False.
WORKAROUND
To work around the problem, change the active cell to one in a fixed row
or column so that no cell has a focus rectangle. Selected cells are
unaffected by changing the active cell. For example, add the following
code to the LostFocus event of a grid control named grid1:
Sub Grid1_LostFocus ()
Grid1.Row = 0
Grid1.Col = 0
End Sub
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.
Modification Type: | Major | Last Reviewed: | 10/30/2003 |
---|
Keywords: | kbbug kbfix KB95514 |
---|
|