Altering selection rect behavior


When link label text is selected, a 2px red focus rect is drawn by default. Since the user can’t do anything with the selection (we return false to CanDelete()), we’d like to not show the focus rect. It is not immediately clear from the docs how to manipulate the GoSelection to accomplish this. Is there possibly an example I could look at?


It’s not red by default–I assume the value of GoView.PrimarySelectionColor has been changed.
Just for that kind of object, you could override AddSelectionHandles to do nothing. It normally either calls GoSelection.CreateBoundingHandle once or GoSelection.CreateResizeHandle several times.
So you could get rid of all selection handles on all objects by overriding those two GoSelection.Create… methods to do and return nothing. To do this I think you’ll need to override GoView.CreateSelection to return a new instance of your GoSelection subclass.
However, I should caution you that not showing any kind of visual selection indication can be confusing to the user.