Microsoft KB Archive/181912

= Selecting a FlexGrid control does not highlight a whole row =

Article ID: 181912

Article Last Modified on 1/6/2006

-

APPLIES TO


 * Microsoft Visual Basic 5.0 Enterprise Edition
 * Microsoft Visual Basic 5.0 Learning Edition
 * Microsoft Visual Basic 5.0 Professional Edition
 * Microsoft Visual Basic 5.0 Control Creation Edition

-



This article was previously published under Q181912



SYMPTOMS
Depending on the setting of the FlexGrid's Highlight property, the grid may not select the entire row. Instead the grid may select only the first cell or no cell at all.



RESOLUTION
Use the Highlight property setting of "1 - flexHighlightAlways."



STATUS
Microsoft has confirmed that this is a problem in the Microsoft products that are listed at the beginning of this article.



Steps to reproduce the behavior
 Start Visual Basic. Form1 is created by default. Choose "Project" from the main menu, and then select "Components." Choose the "MS FlexGrid Control 5.0 (sp2)" from the list of controls. Add a FlexGrid and a CommandButton to the form.  Change the following properties on the FlexGrid control: SelectionMode = 1 - flexSelectionByRow Highlight = 2 - flexHighlightWithFocus

  Add the following code to the Form's Load method: Dim i As Integer

MSFlexGrid1.Cols = 4 MSFlexGrid1.AllowUserResizing = flexResizeColumns MSFlexGrid1.ColWidth(0) = 200

For i = 1 To 25 MSFlexGrid1.AddItem "" + vbTab + Str(i) + vbTab + _ Str(Time) + vbTab + String(i, "*") Next i

 Save the Project and form and run it. Note the entire row is not highlighted. Stop the form. Adjust the FlexGrid's Highlight property from "2 flexHighlightWithFocus" to "1 - flexHighlightAlways."</li> Save the project and run the form again. Hit the down ARROW key or click on a row and note that the rows are highlighted.</li></ol>

Additional query words: kbVBp500 kbVBp600 kbdse kbDSupport kbVBp kbNoKeyWord VB6Test

Keywords: kbprb KB181912

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.