Sign in to follow this  
Followers 0
litlmike

GUICtrlCreateListView , Guictrlread and Drag & Drop

1 post in this topic

2 questions:

1) Is it possible to drag and drop from 1 listview to another listview?

2) If so, what functions should I be using to accomplish the desired behavior for this ListView?

After looking at the help file I am a bit confused, so thanks for the direction.

#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <ListBoxConstants.au3>
#include <WindowsConstants.au3>

$Form1 = GUICreate("Choose the Years You Want Data For", 353, 263, 422, 361)
$ListBoxLeft = GUICtrlCreateList("", 8, 8, 137, 201, BitOR($LBS_SORT,$LBS_MULTIPLESEL, $WS_VSCROLL,$WS_BORDER))
GUICtrlSetData(-1, "Item1|Item2|Item3|Item4|Item5")
$ButtonRight = GUICtrlCreateButton(">", 156, 15, 30, 25, 0)
$ButtonRightAll = GUICtrlCreateButton(">>", 156, 48, 31, 25, 0)
$ButtonLeft = GUICtrlCreateButton("<", 157, 81, 31, 25, 0)
GUICtrlSetState(-1, $GUI_DISABLE)
$ButtonLeftAll = GUICtrlCreateButton("<<", 157, 114, 32, 25, 0)
$ListBoxRight = GUICtrlCreateList("", 200, 8, 137, 201, BitOR($LBS_SORT,$LBS_MULTIPLESEL, $WS_VSCROLL,$WS_BORDER))
$ButtonOK = GUICtrlCreateButton("&OK", 104, 225, 75, 25, 0)
$ButtonCancel = GUICtrlCreateButton("&Cancel", 184, 225, 75, 25, 0)
$Buttonhelp = GUICtrlCreateButton("&Help", 264, 225, 75, 25, 0)
GUISetState(@SW_SHOW)


While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit

        Case $ButtonRight
            ;Move Selected Item to the Right List View
        Case $ButtonRightAll
            ;Move All Item to the Right List View
        Case $ButtonLeft
            ;Move Selected Item to the Left List View
        Case $ButtonLeftAll
            ;Move All Items to the Left List View
    EndSwitch
WEnd

Share this post


Link to post
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
Sign in to follow this  
Followers 0