Setzt die Ansicht des Controls
#include <GuiListView.au3>
_GUICtrlListView_SetView ( $hWnd, $iView )
$hWnd | Control-ID / Handle des Controls |
$iView | Status der Ansicht des Controls: 0 - Große Icon 1 - Details 2 - Liste 3 - Kleine Icon 4 - Kacheln |
Erfolg: | True |
Fehler: | False |
- - - - - - - - Erklärung der Controls - - - - - - - -
#include <GUIConstantsEx.au3>
#include <GuiListView.au3>
#include <MsgBoxConstants.au3>
Example()
Func Example()
GUICreate("ListView: Setzt die Ansicht (v" & @AutoItVersion & ")", 400, 300)
Local $idListview = GUICtrlCreateListView("", 2, 2, 394, 268)
GUISetState(@SW_SHOW)
; Set das ANSI Format
;~ _GUICtrlListView_SetUnicodeFormat($idListview, False)
; Fügt die Spalten hinzu
_GUICtrlListView_AddColumn($idListView, "Items", 100)
; Fügt die Items hinzu
_GUICtrlListView_BeginUpdate($idListView)
For $iI = 1 To 10
_GUICtrlListView_AddItem($idListView, "Item " & $iI)
Next
_GUICtrlListView_EndUpdate($idListView)
; Ansicht setzen
MsgBox($MB_SYSTEMMODAL, "Information", "Ansicht: " & _GUICtrlListView_GetView($idListView))
_GUICtrlListView_SetView($idListView, 4)
MsgBox($MB_SYSTEMMODAL, "Information", "Ansicht: " & _GUICtrlListView_GetView($idListView))
; Die Schleife wiederholt sich, bis der Benutzer die Beenden-Aktion der GUI auslöst.
Do
Until GUIGetMsg() = $GUI_EVENT_CLOSE
GUIDelete()
EndFunc ;==>Example