Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Getting X, Y during Cell dragging? (Read 3876 times)
Carlos_Rocha
Junior Member
**
Offline


I love Jazz

Posts: 70
Joined: Mar 26th, 2010
Getting X, Y during Cell dragging?
Apr 17th, 2011 at 11:13pm
Print Post  
Hi, it's me again Cheesy

I want to move a row from one table to another, or to the same table in a different index position, but I want to visually show the user what's going to happen by temporarily creating a row in the target table under the cursor while draging around. But I couldn't find a way to get the cell pointed, or even the mouse coordinates (during Drag&Drop the MouseMove event is not called). Is there a way with Windows API Roll Eyes

The ideal:
RequestDropInTable(dataType, table, col, row, drop) Grin

PS: this is more important than any of my last requests because it seems there's no turnaround Kiss
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Getting X, Y during Cell dragging?
Reply #1 - Apr 18th, 2011 at 9:06am
Print Post  
Hi,

You can do that by handling the DragOverTable event. Here's a VB example that detects the row under the mouse pointer during drag and drop:

Code
Select All
Private Sub fcx_DragOverTableVB(ByVal table As FLOWCHARTLibCtl.ITableItem, _
	ByVal dataObj As FLOWCHARTLibCtl.IVBDataObject, _
	ByVal docX As Long, ByVal docY As Long, ByVal keyState As Long, effect As Long)

	Dim row As Integer
	row = table.RowFromPoint(docX, docY)
	If row > -1 Then table.CellFillColor(0, row) = vbRed

	effect = vbDropEffectCopy
End Sub

Private Sub Form_Load()
	fcx.RegisterDragDrop
	fcx.DragDropMode = drProgrControlVB
End Sub 



I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
Carlos_Rocha
Junior Member
**
Offline


I love Jazz

Posts: 70
Joined: Mar 26th, 2010
Re: Getting X, Y during Cell dragging?
Reply #2 - Apr 18th, 2011 at 1:22pm
Print Post  
Hi Stoyo,

DragOverTable doesn's fire when DragDropMode is drRequestAccept, and TableCellStartDrag doesn't fire when DragDropMode is drProgrControl.
  
Back to top
 
IP Logged
 
Carlos_Rocha
Junior Member
**
Offline


I love Jazz

Posts: 70
Joined: Mar 26th, 2010
Re: Getting X, Y during Cell dragging?
Reply #3 - Apr 18th, 2011 at 2:57pm
Print Post  
Sorry Stoyo, my bad Embarrassed

I think I'm able to do it without using drRequestAccept. I'll be back to you if needed.

Thank you  Smiley
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint