- Offizieller Beitrag
Ich habe da ein Problem mit einem Listview und zwar möchte ich einzelne Einträge eines Listviews verschieben.
Also innerhalb desselben Listviews z.B. Eintrag2 zwischen Eintrag7 und Eintrag8.
Beispielscript:
Spoiler anzeigen
#include <GUIConstantsEx.au3>
Opt('GUIOnEventMode', 1)
$hGui = GUICreate('test', 400, 500)
GUISetOnEvent($GUI_EVENT_CLOSE, '_End')
GUISetOnEvent($GUI_EVENT_DROPPED, '_Drop')
$hListview1 = GUICtrlCreateListView('Playlist|Length', 5, 5, 390, 200)
GUICtrlSetState(-1, $GUI_DROPACCEPTED)
For $i = 0 To 10
GUICtrlCreateListViewItem('Titel' & $i & '|' & Random(1, 6, 1), $hListview1)
Next
$hListview2 = GUICtrlCreateListView('Playlist|Length', 5, 215, 390, 200)
GUICtrlSetState(-1, $GUI_DROPACCEPTED)
For $i = 0 To 10
GUICtrlCreateListViewItem('Titel' & $i & '|' & Random(1, 6, 1), $hListview2)
Next
GUISetState()
[/autoit] [autoit][/autoit] [autoit]While True
Sleep(20)
WEnd
Func _End()
Exit
EndFunc ;==>_End
Func _Drop()
MsgBox(0, 0, @GUI_DropId)
EndFunc ;==>_Drop
Wenn ich von einem Listview zum anderen einen Eintrag verschiebe, dann öffnet sich die MsgBox, aber beim verschieben innerhalb eines Listviews nicht.
Wie kann man das Problem lösen? Bin schon am verzweifeln...