Dragging an object along Y axis only

Hi,

Is it possible to control dragging an object so that it can only be dragged vertically & not horizontally?

Please provide some example

Thanks

There’s an example of this in the GoDiagram FAQ.

[QUOTE=navneet]
Hi,

I tried with the example shown in FAQ list, it worked when dragging is done,but while dragging a object, it created same object with mouse movement & don't restrict this temporary created object along y axis only.
so plesae tell me that how can i restrict mouse movement while dragging along y axis only?
Tell me also that why it craetes a new temporary object while dragging, i want that the original object which is selected for dragging should be dragged with mouse mevement while dragging.
Thanks
[/quote]

I don’t think we’re talking about the same FAQ entry. Look for this title:


Is it possible to control dragging an object so that it can only be dragged horizontally and not vertically? How do I keep users from dragging a node beyond a range of X positions?
This is the same code as in the LimitedNode sample in Demo1. (the LimitedNode is the "Star" icon with 4 input ports and 3 output ports with the label "test" near the top-left of the view)
Note you can only move that node about half way across the view.

Tell me also that why it creates a new temporary object while dragging…

Do you have GoView.DragsRealTime = true?

Hi,

I want to drag an object by mouse selection only along y axis & then all other objects lie on same y coordinate but with different x coordinate should automatically move along with selected one without mouse selection.
Is it possible in GoDiagram or any appproach?
Thnaks

The GoDraggingTool drags the selection (and has an option SelectsWhenStarts that controls whether the dragging tool Start can modify the selection).

You'll need to write your own DraggingTool to do this.
TreeDraggingTool in TreeApp is a good sample to use as a guide.