Ermittelt die aktuelle Ansicht des Controls
#include <GuiListView.au3>
_GUICtrlListView_GetView ( $hWnd )
$hWnd | Control-ID / Handle des Controls |
Erfolg: | Die aktuelle Ansicht: 0 - große Icons 1 - Details 2 - Liste 3 - kleine Icons 4 - Kacheln |
Fehler: | -1 |
- - - - - - - - Erklärung der Controls - - - - - - - -
_GUICtrlListView_GetViewDetails, _GUICtrlListView_GetViewLarge, _GUICtrlListView_GetViewList, _GUICtrlListView_GetViewSmall, _GUICtrlListView_GetViewTile, _GUICtrlListView_SetView
#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