Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Windows Forms / WinForm General / August 2006

Tip: Looking for answers? Try searching our database.

Drag Drop (C1 and windows forms)

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
feudalac! - 28 Aug 2006 13:18 GMT
I need a litle help with dragdrop...

I can't find anything useful on google...

I have a ComponentOne True Grid and Windows Forms Treeview

i want to drag an item from the grid and into Microsoft Treeview...

so far i have done this:
grid.allowdrag = true
tree.allowdrop = true

private sub grid_mousemove (sender as object, e as drageventargs)
handles grid.mousemove
    if e.button = left then
        grid.dodragdrop(grid,copy)
    end if
end sub

private sub tree_dragdrop (sender as objet, e as drageventargs) handles
tree.dragdrop
    ... code that does everything i need
end sub

the problem is that event tree.dragdrop doesn't happen...
only tree.dragenter

i remember that in vb6 tere was something called 'dragmode' and it was
allways set to 'automatic'

please help

Signature

You're not paid to think. A mindless worker is a happy worker. Shut up
and do your job!
  -  Tata Feudalac!

--------------------------------------------------------
http://www.fotozine.org/index.php?stranica=clan&uid=1352
http://www.thinkgeek.com/brain/gimme.cgi?wid=81d35dc8f
http://groups.google.com/group/fejkneraddangub
--------------------------------------------------------

feudalac! - 28 Aug 2006 14:33 GMT
> I need a litle help with dragdrop...
>
[quoted text clipped - 27 lines]
>
> please help

problem solved...

Signature

You're not paid to think. A mindless worker is a happy worker. Shut up
and do your job!
  -  Tata Feudalac!

--------------------------------------------------------
http://www.fotozine.org/index.php?stranica=clan&uid=1352
http://www.thinkgeek.com/brain/gimme.cgi?wid=81d35dc8f
http://groups.google.com/group/fejkneraddangub
--------------------------------------------------------

feudalac! - 28 Aug 2006 14:56 GMT
> I need a litle help with dragdrop...
>
> I can't find anything useful on google...

Problem is in DragOver event of TreeView

private sub tree_DragOver (Sender as object, e as drageventargs) handles
tree.dragover
 if e.data.getdatapresent("C1.TDBG",True) then
  tree.selectednode = tree.getnodeat(e.x,e.y)
   if tree.selectednode.name = "RootNode" then
    e.effect = copy
   else
    e.effect = none
   end if
 else
  e.effect=none
 end if
end sub

the problem is that in runtime, selected node is not the node at mouse
coordinates but the node that is 3 nodes away (about 50px beneeth the
mouse pointer...)
 i don't want to use   tree.selectednode = tree.getnodeat(e.x,e.y - 50)

is there a sollution?

Thanks

Signature

You're not paid to think. A mindless worker is a happy worker. Shut up
and do your job!
  -  Tata Feudalac!

--------------------------------------------------------
http://www.fotozine.org/index.php?stranica=clan&uid=1352
http://www.thinkgeek.com/brain/gimme.cgi?wid=81d35dc8f
http://groups.google.com/group/fejkneraddangub
--------------------------------------------------------


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.