Sign in to follow this  
Followers 0
pixartist

drag & drop for listview items!?

3 posts in this topic

Hi, how can i create a listview so that items can be sorted per drag'n drop ?

thanks

Share this post


Link to post
Share on other sites



Hi, can you supply some sample code to work with , so someone can just mod your sample instead of someone having to write an example from scratch...

Cheers

Share this post


Link to post
Share on other sites

$ToneBox = GUICtrlCreateListView("Tone|Frequency|Length", 0, 96, 186, 278, 0)

;..............


Case $msg = $Add
    $fVal = GUICtrlRead($frequency)
    $dVal = GUICtrlRead($length)
    $tVal = "Custom"
    if $fVal == "" Or $dVal == "" Then
    ;
    Else
        
        Select
            Case $fVal = $toneC
                $tVal = "C1"
            Case $fVal = $toneD
                $tVal = "D1"
            Case $fVal = $toneE
                $tVal = "E1"
            Case $fVal = $toneF
                $tVal = "F1"
            Case $fVal = $toneG
                $tVal = "G1"
            Case $fVal = $toneA
                $tVal = "A1"
            Case $fVal = $toneH
                $tVal = "H1"
            Case $fVal = $toneC2
                $tVal = "C2"
            Case $fVal = 0
                $tVal = "Wait"
        EndSelect
    ;;adding listview item +++++++++++++++++++++++++++++++++
        GUICtrlCreateListViewItem($tVal & "|" & $fVal & "|" & $dVal,$ToneBox)
        paint()
    ;GUICtrlSetState(-1,$GUI_DROPACCEPTED)
    ;GUISetState()

    EndIf

well there i created a listview....

how can items be dragged and dropped within the listview now?

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