Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Drag & Drop from external control (Read 1444 times)
LuckyWolf19
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 11
Joined: Apr 13th, 2007
Drag & Drop from external control
Apr 13th, 2007 at 3:15pm
Print Post  
Can anyone refer me to a source to figure out how to do drag&drop from a windows tree control to the flowChart control?

Here is the senario:
User selects a tree node in the treeview control, then drags it over top of the flowChart control. As it is being dragged over the flowChart control the drag cursor looks like a textbox. After the drop a text box will appear in the flowChart control.

Thanks,

Scott Peal
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Drag & Drop from external control
Reply #1 - Apr 13th, 2007 at 5:19pm
Print Post  
Hi,

You can do that by calling Control.DoDragDrop from the TreeView.MouseDown event handler, and creating the box in the FlowChart.DragDrop event. That's shown for a ListView in the Flowcharter sample project, and in one of the "miscellaneous" steps of the FCDemo example.

Stoyan
  
Back to top
 
IP Logged
 
LuckyWolf19
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 11
Joined: Apr 13th, 2007
Re: Drag & Drop from external control
Reply #2 - Apr 15th, 2007 at 4:24pm
Print Post  
Thanks for the advice. Actually, I have figured out most of it, just not how to get the drag icon to match the shape the user drags onto the formChart.

You have to use the viewtree item drag event.

The sample from MindFusion you mention does not show how to show the shape as it is being dragged, though.
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint