Highlight With Selection Handles?

Hi I want to click on on a link that will highlight it and also add the selection handles at the same time
I can only seem to get the selection handles when I move the midlabel and click near the line, that is the only time I have those selection labels
Any Ideas?

I assume this is a continuation of http://www.nwoods.com/forum/forum_posts.asp?TID=1601.
If a “label” of a GoLabeledLink is Selectable, then clicking on it will just select it, not the whole link. If it is not Selectable, then the whole link will be selected.
When the link is selected, since GoLabeledLink.SelectionObject returns the GoLabeledLink.RealLink, the RealLink (a GoLink) will be responsible for showing that it is selected. If you have overridden AddSelectionHandles and RemoveSelectionHandles correctly, you ought to always get both the HighlightPen and the resize handles.

Yes it is a continuation of that post...but I wanted to suprise you and pretend it was a new problem The RealLink that I have created below overrides AddSelectionHandles and RemoveSelectionHandles Im still familarizing myself with this sdk... Thanks for your help.. please see the class below [Serializable] public class RealLink : GoLink { public RealLink() { HighlightWhenSelected = true; HighlightPen = Pens.LightGreen; HighlightPenWidth = 2.0f; Relinkable = true; Reshapable = true; Resizable = true; AvoidsNodes = true; AdjustingStyle = GoLinkAdjustingStyle.End; Curviness = -5; ToArrow = true; }

public override void AddSelectionHandles(GoSelection sel, GoObject selectedObj)
base.AddSelectionHandles(sel, selectedObj);
bool oldskips = this.SkipsUndoManager;
this.SkipsUndoManager = true;
HighlightWhenSelected = true;
this.Highlight = true;
this.SkipsUndoManager = oldskips;
public override void RemoveSelectionHandles(GoSelection sel)
this.Highlight = false;
HighlightWhenSelected = false;
bool oldskips = this.SkipsUndoManager;
this.SkipsUndoManager = true;
this.SkipsUndoManager = oldskips;

You shouldn’t be setting the HighlightWhenSelected property at all, except perhaps in the constructor to make sure it is false.
That’s because your overrides of AddSelectionHandles and RemvoeSelectionHandles are implementing what you want, so setting the HighlightWhenSelected property will just confuse things.

I have changed a setting and now its saying that
is not supported…is there some kind of way i can find all these settings of what the right combinations are please?

What is saying that?

I am getting the exception from gotool relinking. Relinking inherits from GoToolRelinking PickNearestPort(PointF dc) in C:\source\GoDiagram\ReLinking.cs:line 123

hopefully this gives you more information…
System.NotSupportedException: Specified method is not supported.
at GoDiagram.ReLinking.PickNearestPort(PointF dc) in C:\source\GoDiagram\ReLinking.cs:line 123
at Northwoods.Go.GoToolLinking.DoLinking(PointF dc)
at Northwoods.Go.GoToolLinking.DoMouseMove()
at Northwoods.Go.GoView.DoMouseMove()
at Northwoods.Go.GoView.OnMouseMove(MouseEventArgs evt)
at System.Windows.Forms.Control.WmMouseMove(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(M essage& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Mes sage& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

That’s weird. Did you really override GoToolLinking.PickNearestPort? What declaration did you specify for your method in your ReLinking class?

Your telling me… I was so close to what i wanted as well…
I changed one of those settings on the link artefact to get the highlighting working as im prototyping and now it doesn’t run the method that i have override…
public override IGoPort PickNearestPort(PointF dc)

I don’t know what’s wrong. I suggest you shut down Visual Studio, delete all of its temporary/generated files (*.suo, obj, bin) and try again. Oh, and make sure the project reference to Northwoods.Go.dll is to the right version.