I would like to indicate to the user that they are trying to drag to wrong node level by changing the icon on the mouse. I can’t seem to get a handle on this…any suggestions?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Dropping on a treeview is an iffy proposition, the node that the user would want to drop on might not be visible. Either because it is collapsed and hidden or scrolled off the screen. Anyhoo, you want to use the DragOver event and check where the mouse is located. Here’s a sample form that does this. Drop a treeview on it and add some nodes. Click on the form and drag. It only allows drops on the 2nd level nodes: