Drag between listboxes and row/celltag

  1. last week

    Alberto D

    Sep 13 Pre-Release Testers, Xojo Pro

    I started playing with: Desktop/DragAndDrop/ListBoxesDragAndDrop
    changed that to allow multiple columns with

    Me.cell(Me.LastIndex,-1) = OrigListBox.cell(mDragRow,-1)

    that way I don't need to copy each cell.

    I did some tests and RowTag and CellTag are not copied, so I tried to find an easy way to do it (like -1 for column) but was not able to do it.

    Some my question is: to copy CellTag from a dragged row from listbox1 to listbox2, the only way to do it is copy each value?

  2. Tim P

    Sep 13 Pre-Release Testers feedback://46303

    A little loop will do the trick.

    for i as Integer = 0 to (OrigListBox.ColumnCount - 1)
      lbDestination.CellTag(mDragRow, i) = OrigListBox.CellTag(mDragRow, i)
    
    next

    {written in the post editor disclaimer}

  3. Alberto D

    Sep 13 Pre-Release Testers, Xojo Pro

    Thank you Tim, that's what I have. Just wanted to make sure I was not missing some trick.

      For i As Integer = 0 To Me.ColumnCount - 1
        Me.CellTag(Me.LastIndex,i) = OrigListBox.CellTag(mDragRow,i)
      Next

    BTW, I think I would start using ( ) when I have "To (Me.ColumnCount - 1)". It may be the same, but it is more clear when I read it. Thanks.

  4. Tim P

    Sep 14 Pre-Release Testers feedback://46303

    @Alberto D;Poo It may be the same, but it is more clear when I read it.

    That's why I do it!

or Sign Up to reply!