Results 1 to 7 of 7

Thread: [RESOLVED] Drag Drop ListView Object Variable not set why?

  1. #1

    Thread Starter
    Enjoy the moment
    Join Date
    Feb 2011
    Location
    Barrio Del pilar madrid spain
    Posts
    5,204

    Resolved [RESOLVED] Drag Drop ListView Object Variable not set why?

    hey,
    i have a code using drop and drag in a listview
    i put all the variables that is needed but still i get a error why?
    this is the code i am using
    Code:
    Private DraggedOverItem As XtremeSuiteControls.ListViewItem
    Private MovedItem As XtremeSuiteControls.ListViewItem
    Private DraggedItem As XtremeSuiteControls.ListViewItem
    Private SubItemIndex As Long
    Code:
    Private Sub LsVw_DragDrop(Source As Control, x As Single, y As Single)
        
        With LsVw
            Set DraggedOverItem = .HitTest(x, y)
            With LsVw.ListItems
                If DraggedOverItem Is Nothing Then
                    Set MovedItem = .Add(, , DraggedItem.Text)
                Else
                    Set MovedItem = .Add(DraggedOverItem.Index, , DraggedItem.Text) ' Here Error
                    Set DraggedOverItem = Nothing
                End If
                With MovedItem
                    For SubItemIndex = 1 To LsVw.ColumnHeaders.Count - 1
                        .SubItems(SubItemIndex) = DraggedItem.SubItems(SubItemIndex)
                    Next
                    .Selected = True
                End With
                Set MovedItem = Nothing
                .Remove DraggedItem.Index
            End With
            Set DraggedItem = Nothing
            Set .DropHighlight = Nothing
            .Drag vbEndDrag
        End With
    End Sub
    
    Private Sub lsvw_DragOver(Source As Control, x As Single, y As Single, State As Integer)
        With LsVw
            If State = ccEnter Then Set .DropHighlight = .HitTest(x, y)
        End With
    End Sub
    
    Private Sub LsVw_ItemClick(ByVal Item As XtremeSuiteControls.ListViewItem)
        Set DraggedItem = Item
        Item.Selected = False
        With LsVw
            .Drag vbBeginDrag
        End With
    End Sub
    tnx for any help
    regards
    salsa

  2. #2
    gibra
    Guest

    Re: Drag Drop ListView Object Variable not set why?

    Sure that ListView control is part of Codejock.Controls activex?
    In this case you should ask for help in Codejock ActiveX forum.

  3. #3

    Thread Starter
    Enjoy the moment
    Join Date
    Feb 2011
    Location
    Barrio Del pilar madrid spain
    Posts
    5,204

    Re: Drag Drop ListView Object Variable not set why?

    Quote Originally Posted by gibra View Post
    Sure that ListView control is part of Codejock.Controls activex?
    In this case you should ask for help in Codejock ActiveX forum.
    yes sir correct
    i asked a long time ago it take them ages to answer
    can you help me please figure this one out?

  4. #4
    gibra
    Guest

    Re: Drag Drop ListView Object Variable not set why?

    Give me the link that you opened on Codejock forum...

  5. #5

    Thread Starter
    Enjoy the moment
    Join Date
    Feb 2011
    Location
    Barrio Del pilar madrid spain
    Posts
    5,204

    Re: Drag Drop ListView Object Variable not set why?

    Quote Originally Posted by gibra View Post
    Give me the link that you opened on Codejock forum...
    what do you mean the link?
    you want the demo version of the controls?

  6. #6
    gibra
    Guest

    Re: Drag Drop ListView Object Variable not set why?

    If have written that you has asked help on Codejock forum, then send me the link of this thread. So I can reply to it.

    Please note that: VBForum isn't the official forum of Codejock products.
    Your request, here, is off topic.

  7. #7

    Thread Starter
    Enjoy the moment
    Join Date
    Feb 2011
    Location
    Barrio Del pilar madrid spain
    Posts
    5,204

    Re: Drag Drop ListView Object Variable not set why?

    no link sir i send them a email
    never mind i'll try to find another solution
    tnx

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width