<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic How to create a ListBox with dragable/movable (drag &amp;amp; drop) item? in Archicad C++ API</title>
    <link>https://community.graphisoft.com/t5/Archicad-C-API/How-to-create-a-ListBox-with-dragable-movable-drag-amp-drop-item/m-p/292515#M4093</link>
    <description>&lt;DIV class="actalk-migrated-content"&gt;I am creating a dialog with list box. The items should me dragable/movable to any row. I am using ListBoxObserver but I am unable to do it.&lt;/DIV&gt;</description>
    <pubDate>Wed, 12 Jul 2023 12:22:21 GMT</pubDate>
    <dc:creator>ReignBough</dc:creator>
    <dc:date>2023-07-12T12:22:21Z</dc:date>
    <item>
      <title>How to create a ListBox with dragable/movable (drag &amp; drop) item?</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/How-to-create-a-ListBox-with-dragable-movable-drag-amp-drop-item/m-p/292515#M4093</link>
      <description>&lt;DIV class="actalk-migrated-content"&gt;I am creating a dialog with list box. The items should me dragable/movable to any row. I am using ListBoxObserver but I am unable to do it.&lt;/DIV&gt;</description>
      <pubDate>Wed, 12 Jul 2023 12:22:21 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/How-to-create-a-ListBox-with-dragable-movable-drag-amp-drop-item/m-p/292515#M4093</guid>
      <dc:creator>ReignBough</dc:creator>
      <dc:date>2023-07-12T12:22:21Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a ListBox with dragable/movable (drag &amp; drop) item?</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/How-to-create-a-ListBox-with-dragable-movable-drag-amp-drop-item/m-p/292516#M4094</link>
      <description>There is 2 way&lt;BR /&gt;
&lt;BR /&gt;
1. Full Drag-Drop&lt;BR /&gt;
&lt;BR /&gt;
Call the EnableDragAndDropEvent() for panel (dialog)&lt;BR /&gt;
&lt;BR /&gt;
Implement Drag-Drop handlers of the ListBoxObserver (ListBoxDragSourceObserver, ListBoxDropTargetObserver), at last&lt;BR /&gt;
ListBoxDragStarting, ListBoxDragStarted, ListBoxDragEntered, ListBoxDragMoved, ListBoxDropped&lt;BR /&gt;
&lt;BR /&gt;
2.  Simple row dragging&lt;BR /&gt;
&lt;BR /&gt;
Create an "drag" icon column. Fill it the DG::ListBox::DragIcon or any other.&lt;BR /&gt;
&lt;BR /&gt;
Call list.EnableMouseMoveEvent() for the list box&lt;BR /&gt;
&lt;BR /&gt;
Implement ListBoxMouseMoved( const DG::ListBoxMouseMoveEvent&amp;amp; ev, short* inArea );&lt;BR /&gt;
When a mouse will be over the drag icon column, assign *inArea = DG::ListBox::DragArea.&lt;BR /&gt;
&lt;BR /&gt;
Implement ListBoxItemDragged( const DG::ListBoxDragEvent&amp;amp; ev ) to handle dragging</description>
      <pubDate>Mon, 28 May 2018 12:10:40 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/How-to-create-a-ListBox-with-dragable-movable-drag-amp-drop-item/m-p/292516#M4094</guid>
      <dc:creator>Oleg</dc:creator>
      <dc:date>2018-05-28T12:10:40Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a ListBox with dragable/movable (drag &amp; drop) item?</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/How-to-create-a-ListBox-with-dragable-movable-drag-amp-drop-item/m-p/292517#M4095</link>
      <description>Thank you.&lt;BR /&gt;
&lt;BR /&gt;
The error in my code was in ListBoxMouseMoved() function since I follow the documentation:&lt;BR /&gt;

&lt;PRE&gt;virtual void ListBoxMouseMoved (
    const ListBoxMouseMoveEvent &amp;amp; ev,
    bool *              inDragArea
);&lt;/PRE&gt;

It is now working after I changed it to short.</description>
      <pubDate>Tue, 29 May 2018 03:21:00 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/How-to-create-a-ListBox-with-dragable-movable-drag-amp-drop-item/m-p/292517#M4095</guid>
      <dc:creator>ReignBough</dc:creator>
      <dc:date>2018-05-29T03:21:00Z</dc:date>
    </item>
  </channel>
</rss>

