|
-
Sep 11th, 2006, 11:43 AM
#1
Thread Starter
New Member
[RESOLVED] VB6 MshFlexGrid select full row problem (even with flexSelectionByRow enabled)
Hello all
I've been having numerous difficulties with showing a full row on a MSHFlexGrid as being selected. This has come up on several grids i have developed.
I want users to be able to select one record and only one record at any given time. When they click on a record, it should highlight the whole row and not just part of it.
This is a problem of formatting and presentation - it looks awful when the user clicks a row and only part of it goes blue. Sometimes it is only the left-most cell that stays white.
On one grid, when the user uses a keyboard shortcut to activate the grid control, only columns 4 onwards are highlighted on the selected row, even if the user uses the cursor keys to move up and down. Puzzlingly, if a row is selected with the mouse, the full row is highlighted.
The properties of the grids that i have set are:
RowSizingMode - flexRowSizeIndividual
SelectionMode - flexSelectionByRow
Highlight - flexHighlightAlways
Redraw - True
AllowBigSelection - False
FixedRows - varied, no change to results
FixedCols - varied, no change to results
Is there any hard and fast way to ensure that a row clicked on a MSHFlexGrid will be highlighted in its entirety, no matter how many columns or rows it has, by setting any of the above attributes or any other ones?
many thanks
-
Sep 11th, 2006, 11:54 AM
#2
Re: VB6 MshFlexGrid select full row problem (even with flexSelectionByRow enabled)
Do you mean this:
VB Code:
Private Sub MSFlexGrid1_Click()
With MSFlexGrid1
.Col = 0
.ColSel = .Cols - 1
End With
End Sub
-
Sep 11th, 2006, 12:28 PM
#3
Thread Starter
New Member
Re: VB6 MshFlexGrid select full row problem (even with flexSelectionByRow enabled)
Hi Gavio
funnily enough those lines of code worked beautifully on one of my grids but not the other one i tried!!
i'm happy to have at least one grid resolved and can hopefully get more clues from this as to why the other one(s) don't work as well...
thanks
-
Sep 11th, 2006, 12:31 PM
#4
Re: VB6 MshFlexGrid select full row problem (even with flexSelectionByRow enabled)
take an out of the box MSHFlexGrid.
change:
FocusRect = 0 - flexFocusNone
SelectionMode = 1 - flexSelectionByRow
-
Sep 12th, 2006, 04:32 AM
#5
Thread Starter
New Member
Re: VB6 MshFlexGrid select full row problem (even with flexSelectionByRow enabled)
Yessssss! Result.
very happy.
many thanks
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|