Problem with selection Move

Hello,
I have a customized GoNode which contains an instance of GoText(label). GoText(Label) is selectable and movable around the node. Also node has pickablebackground set and is also movable in which case label also moves as a child which is expected behavior.
Now the scenario is as follows
a> User selects GoNode by mouse click on Node( Not on its label)
b> Places mouse cursor on Label(GoText)
c> Now tries to move node by mouse press and drag
Expected:
Whole node along with label(gotext) moves
Observed:
GoText(Label) gets selected and only label starts moving
Could you please help us to resolve this?
Thanks,
Nagaraj.

The Label is draggable independent from the node, right?

But if the node is already selected, you want a drag on the Label to drag the node and not the Label?
Do I have that right?

Hi Jake,

Exactly. I tried using GoObject.DragsNode property for GoText(Label).
But this prevents moving of only label around node and always moves
the node.
Thanks,
Nagaraj.

Well, there are a lot of different ways to do this… perhaps the easiest is to just modify the GoObject.DragsNode property when the main node gets selected. You could override OnGotSelection/OnLostSelection on your node (see ChartNode in Classier for a sample of these overrides).

turn off Undo (SkipsUndoManager) when you're playing with DragsNode, like in this note from yesterday.

Hollow Link

and now, for my editorial comment:
I'm not sure that having selection change the behavior of a node is good user interface design...

Hello,

I tried overriding the methods mentioned but it is not working as when

I place mouse cursor on Label and start dragging, OnLostSelection is called which resets the property and hence only label starts moving.

Following is the code: public override void OnGotSelection(GoSelection sel) { bool oldskips = this.SkipsUndoManager; this.SkipsUndoManager = true; m_Label.DragsNode = true; this.SkipsUndoManager = oldskips; base.OnGotSelection(sel); } public override void OnLostSelection(GoSelection sel) { bool oldskips = this.SkipsUndoManager; this.SkipsUndoManager = true; m_Label.DragsNode = false; base.OnLostSelection(sel); this.SkipsUndoManager = oldskips; }

Please let me know if something is incorrect in the above code?
Could you please mention other ways also?
Thanks,
Nagaraj.

Hi,
Could you please suggest on other solutions for this functionality?
Thanks,
Nagaraj.

working on getting 3.0.3 out… I looked at this a little yesterday…be back later.