Hallo zusammen,
wenn ich alle Spalten mit der For Schleife löschen möchte, bleibt immer eine übrig.
Weiß jemand wieso? Von 0 bis letzter Spalte müsste doch alle löschen....
AutoIt
#include <GUIConstantsEx.au3>
#include <GuiListView.au3>
#include <MsgBoxConstants.au3>
Example()
Func Example()
Local $idListview
GUICreate("ListView Delete Column", 400, 300)
$idListview = GUICtrlCreateListView("col1|col2|col3", 2, 2, 394, 268)
GUICtrlCreateListViewItem("line1|data1|more1", $idListview)
GUICtrlCreateListViewItem("line2|data2|more2", $idListview)
GUICtrlCreateListViewItem("line3|data3|more3", $idListview)
GUICtrlCreateListViewItem("line4|data4|more4", $idListview)
GUICtrlCreateListViewItem("line5|data5|more5", $idListview)
GUISetState(@SW_SHOW)
MsgBox($MB_SYSTEMMODAL, "Information", "Delete Column")
_GUICtrlListView_DeleteColumn($idListview, 1)
For $i = 0 To _GUICtrlListView_GetColumnCount($idListview)
_GUICtrlListView_DeleteColumn($idListview, $i)
Next
; Loop until the user exits.
Do
Until GUIGetMsg() = $GUI_EVENT_CLOSE
GUIDelete()
EndFunc ;==>Example
Alles anzeigen
Danke und Gruß,
horphi