I'm having a problem where my selection handles are getting drawn with the incorrect color.
I'd like for the handles to always display using the View's PimarySelectionColor for the primary in the selection and all other GoObjects should be drawn with the SecondarySelection color. This is mostly achieved by setting the NoFocusSelection color to the PrimarySelectionColor.
In my application, I occasionally need to have things redrawn in a GoView which does not have focus. For example, I have a top level window in my application with a property sheet where I can change behavior in the GoSelection of a nonfocused GoView. Changes are for things like othogonal to non-orthogonal for links (and have them redrawn), etc.
The view which does not have focus will create the selection handles inside of CreateResizeHandle(). If the selection instance isn't Focused, then all handles get drawn with the NoFocusSelection color (in my case all are drawn in the PrimarySelectionColor) which is undesirable. I've changed the Focused conditional code to the following and all seems to be fine:
if (this.Focused || view.NoFocusSelectionColor == view.PrimarySelectionColor)
{
if (this.Primary != null && this.Primary.SelectionObject == obj)
public class SpecialView : GoView {
public SpecialView() {
public override GoSelection CreateSelection() {
return new SpecialSelection(this);
}
}[/code]