You are not logged in.
This forum has been archived and no longer accepts new user registrations. Please report your questions, problems, and feedback to the issue page of ReoGrid on GitHub. Thank you for your cooperation.
Pages: 1
Topic closed
I wanted to know how to do deselect a highlighted range after i select it?
Here is the code i am using:
If e.Modifiers = Keys.Control AndAlso e.KeyCode = Keys.A Then
If rgDataGatheringControlContainer.Name = Me.ActiveControl.Name Then
rgDataGatheringControl.SelectRange(2, 1, 32, 2)
End If
nonNumberEntered = True
Exit Sub
End If
I have tried to use object.RemoveHighlightRange(range) and object.RemoveAllHighlightRanges() and both do not do what i want.. is there a way to just to deselect all?
Shane
Offline
Hi Shane,
You want to hide the focus selection range?
By default the focus selection range cannot be hidden, unless set the SelectionMode to None.
This is focus selection range, by default it cannot be hidden.
When set the SelectionMode to None, it will disappear.
VB:
worksheet.SelectionMode = ReoGridSelectionMode.None
To restore it, set the SelectionMode back to Range:
VB:
worksheet.SelectionMode = ReoGridSelectionMode.Range
This is a highlight range, it's another feature than focus selection range. (It's an hidden feature was designed to support the formula editor in future version)
To add a highlight range:
VB:
'Add highlight range
Dim refRange = worksheet.AddHighlightRange(New ReoGridRange("B2:D3"))
'Change highlight range color
refRange.HighlightColor = System.Drawing.Color.Blue
But I just found a bug in v0.8.8 with the SelectionMode = None, I will fix it.
Last edited by Jingwood (2014-12-08 02:21:18)
Offline
Pages: 1
Topic closed