Notifications
Clear all
[Closed] DevXpress TreeList – accessing node during Drag&Drop
Jun 10, 2014 8:20 am
I’m trying to access node in DevXpress TreeList during Drag&Drop move, but I’m getting Undefined on CalcHitInfo()
I would like to receive some data about the node when user hover over it, mainly to filter possibility to drop the item on the item under.
rollout tltest "XtraTreeList Test" width: 500 height: 200 ( dotNetControl tl "DevExpress.XtraTreeList.TreeList" width: 450 height: 180 on tltest open do ( tl.OptionsBehavior.DragNodes = true tl.OptionsBehavior.editable = false tl.DragNodesMode = tl.DragNodesMode.Advanced tl.BeginUpdate() col = tl.Columns.Add() col.visible = true tl.Columns.item[0].Fixed = tl.Columns.item[0].Fixed.Left tl.EndUpdate() tl.BeginUnboundLoad() n0 = tl.AppendNode #("green") -1 n1 = tl.AppendNode #("blue") -1 n2 = tl.AppendNode #("gold") -1 tl.EndUnboundLoad() ) on tl DragOver arg do ( p = dotNetObject "System.Drawing.Point" arg.x arg.y TheNode = (tl.CalcHitInfo p).Node print TheNode ) ) createdialog tltest
Does anybody have experience with this, please?
Thanks.
1 Reply
Jun 10, 2014 8:20 am
can’t read your script (bad formating…)
I think you must use the treeview coordonate system, not screen coordonates
something like:
p = tl.PointToClient arg.x arg.y