Jump to content

Function for moving Selected item from.......


Recommended Posts

Here it is...

Func _Move_Selected_Item_To_Another_List_View($Source_List_View,$Destination_List_view)
            GUICtrlCreateListViewItem(GUICtrlRead(GUICtrlRead($Source_List_View)), $Destination_List_view)
            Dim $LVM_DELETEITEM, $a, $ItemCount, $Source_Title
            $LVM_DELETEITEM = 0x1008
            $ItemCount = ControlListView("", "", $Source_List_View, "GetItemCount")
            For $a = 0 To $ItemCount - 1
                If ControlListView("", "", $Source_List_View, "IsSelected", $a) Then
                    GUICtrlSendMsg($Source_List_View, $LVM_DELETEITEM, $a, 0)
                    $a = $a - 1
                EndIf
            Next
EndFunc

It is used to move the selected item from a source list view to a destination list view.

What do you think about the function? Do you think it could make it to the next version of Autolt?

.

Link to comment
Share on other sites

shorten the name and make sure it meets the UDF standards

[font="Times"] If anyone remembers me, I am back. Maybe to stay, maybe not.----------------------------------------------------------------------------------------------------------[/font][font="Times"]Things I am proud of: Pong! in AutoIt | SearchbarMy website: F.R.I.E.S.A little website that is trying to get started: http://thepiratelounge.net/ (not mine)[/font][font="Times"] ----------------------------------------------------------------------------------------------------------[/font][font="Arial"]The newbies need to stop stealing avatars!!! It is confusing!![/font]

Link to comment
Share on other sites

shorten the name and make sure it meets the UDF standards

<{POST_SNAPBACK}>

I changed it to this

Func _MoveItemBetweenLVs($Source_List_View,$Destination_List_view)
            GUICtrlCreateListViewItem(GUICtrlRead(GUICtrlRead($Source_List_View)), $Destination_List_view)
            Dim $LVM_DELETEITEM, $a, $ItemCount, $Source_Title
            $LVM_DELETEITEM = 0x1008
            $ItemCount = ControlListView("", "", $Source_List_View, "GetItemCount")
            For $a = 0 To $ItemCount - 1
                If ControlListView("", "", $Source_List_View, "IsSelected", $a) Then
                    GUICtrlSendMsg($Source_List_View, $LVM_DELETEITEM, $a, 0)
                EndIf
            Next
EndFunc

Thanks for the reply. I think it meets the UDF standard.

.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...