Jump to content
Developer Wiki and Function Reference Links ×

Listbrower: Enabling Drag and Drop not working

Stefan Bender

Recommended Posts

Dear developers,


I'm trying to support drag and drop in a listbrowser control.


After creating the columns in the dialog's setup handler, I call

 Boolean det_ddc = gSDK->SetListBrowserDragAndDropColumn( m_d, item, ind_column);
   Boolean enab_dd = gSDK->EnableListBrowserDragAndDrop( m_d, item, true);


Item and column exist, either function return true for success so everything should be fine.


Unfortunately, when I'm hovering over the column, the cursor does not become the drag and drop cursor and so I  can't drag and drop anything.


Has anybody an idea which undocumented things I need to do (or must not do) beside calling these functions?


Which undocumented side effects of other SDK functions might have caused drag and drop to become disabled? There is no SDK function or member function of VWListBrowserControl to find out if drag and drop mode is actually switched on...


Thanks for any help,


Stefan Bender





Link to comment

Thanks, but..

I've seen other dialogs that seem to work where drag and drop is also enabled before the LB is actually filled with data.

I tried what you proposed, but no effect. @Vlad Do you or the engineers in charge of listbrowsers have an idea what is wrong with EnableListBrowserDragAndDrop()? Drag and Drop support is considered to be an important feature in one of our new dialogs. Thanks!



Link to comment

Not that this should make a difference, but you can also use VWListBrowserColumn::SetAsDragAndDropColumn(). That would just give some extra checks that m_d and item are valid.


I believe the column has to be kListBrowserControlNumber. The data don't necessarily have to be numbers (you can use A, B, C, etc.), but they type has to be numeric. You'll notice on existing dialogs that you can only get the drag and drop cursor over some kind of index column.

Link to comment
1 hour ago, Pat Stanford said:

The article on list browsers from Vectorlab has been reworked and uploaded by the author ( @_c_ ) to the devloper pages.



Indeed! Updated on December 31 of last year, no less. Thanks, @Pat Stanford (and many thanks @_c_).


The note about the numeric column for drag and drop is here: https://developer.vectorworks.net/index.php/User:CBM-c-/VS-List_Browsers_part_2#Column_Drag_and_Drop


Working with list browsers is considerably more pleasant with the SDK than with VS, but many names and requirements are still a bit opaque.


  • Like 2
Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...