Maxon Developers Maxon Developers
    • Documentation
      • Cinema 4D Python API
      • Cinema 4D C++ API
      • Cineware API
      • ZBrush GoZ API
      • Code Examples on Github
    • Forum
    • Downloads
    • Support
      • Support Procedures
      • Registered Developer Program
      • Plugin IDs
      • Contact Us
    • Categories
      • Overview
      • News & Information
      • Cinema 4D SDK Support
      • Cineware SDK Support
      • ZBrush 4D SDK Support
      • Bugs
      • General Talk
    • Unread
    • Recent
    • Tags
    • Users
    • Login

    Dragging multiple items in treeview

    SDK Help
    0
    2
    137
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • H
      Helper
      last edited by

      THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

      On 13/01/2006 at 09:32, xxxxxxxx wrote:

      User Information:
      Cinema 4D Version:   9.5 
      Platform:      
      Language(s) :     C++  ;

      ---------
      Hi,

      I would like to drag multiple selected items from a treeview, to another item in the treeview.

      Currently, I can re-organize the treeview items 1 by 1, but I'm not sure how to make it work with multiple selected items.

      I am currently doing it like this

        
          virtual void InsertObject(void *root,void *userdata,void *obj,LONG dragtype,void *dragobject,LONG insertmode, Bool bCopy)  
                {  
                     BaseObject *head = (BaseObject* )root;  
                     UserData *user = (UserData* )userdata;  
                     BaseObject *op = (BaseObject* )obj;  
                       
                     switch(dragtype)  
                     {  
        
                     case MYPLUGIN_ITEM_DRAG:   
                          {  
             
                               BaseObject *dragop = (BaseObject* )dragobject;  
                               dragop->Remove();  
                               dragop->InsertUnder(op);  
                            
        
                               break;  
                          }  
        
                     }  
                     return ;  
      

      dragobject looks like its always a BaseObject, and not an AtomArray (which I was assuming if I dragged multiple selected items)

      1 Reply Last reply Reply Quote 0
      • H
        Helper
        last edited by

        THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

        On 13/01/2006 at 13:13, xxxxxxxx wrote:

        Have you tried checking for DRAGTYPE_ATOMARRAY in the BFM_DRAGRECEIVE message? Since the TreeView is basically an extension of GeUserArea (note that I say 'basically'), this message should be received somewhere (either in the TreeView or in the owning GeDialog).

        There is also something else to consider from TreeViewFunctions: GenerateDragArray().

        Having not tried any multiple-object drags in a TreeView myself, I'm just offering up some suggestions. 🙂

        1 Reply Last reply Reply Quote 0
        • First post
          Last post