Creates a work area within the control
#include <GuiListView.au3>
_GUICtrlListView_SetWorkAreas ( $hWnd, $iLeft, $iTop, $iRight, $iBottom )
$hWnd | Control ID/Handle to the control |
$iLeft | X coordinate of the upper left corner of the rectangle |
$iTop | Y coordinate of the upper left corner of the rectangle |
$iRight | X coordinate of the lower right corner of the rectangle |
$iBottom | Y coordinate of the lower right corner of the rectangle |
_GUICtrlListView_GetNumberOfWorkAreas
#include <GUIConstantsEx.au3>
#include <GuiImageList.au3>
#include <GuiListView.au3>
#include <MsgBoxConstants.au3>
Example()
Func Example()
GUICreate("ListView Set Work Areas (v" & @AutoItVersion & ")", 400, 300)
Local $idListview = GUICtrlCreateListView("", 2, 2, 394, 268)
GUICtrlSetStyle($idListview, $LVS_ICON)
GUISetState(@SW_SHOW)
; Set ANSI format
;~ _GUICtrlListView_SetUnicodeFormat($idListview, False)
; Load images
Local $hImage = _GUIImageList_Create()
_GUIImageList_Add($hImage, _GUICtrlListView_CreateSolidBitMap($idListview, 0xFF0000, 16, 16))
_GUIImageList_Add($hImage, _GUICtrlListView_CreateSolidBitMap($idListview, 0x00FF00, 16, 16))
_GUIImageList_Add($hImage, _GUICtrlListView_CreateSolidBitMap($idListview, 0x0000FF, 16, 16))
_GUICtrlListView_SetImageList($idListview, $hImage, 0)
; Add columns
_GUICtrlListView_AddColumn($idListview, 0, "Items", 100)
; Add items
_GUICtrlListView_AddItem($idListview, "Item 1", 0)
_GUICtrlListView_AddItem($idListview, "Item 2", 1)
_GUICtrlListView_AddItem($idListview, "Item 3", 2)
; Create work area
_GUICtrlListView_SetWorkAreas($idListview, 0, 0, 100, 100)
MsgBox($MB_SYSTEMMODAL, "Information", "Work Areas: " & _GUICtrlListView_GetNumberOfWorkAreas($idListview))
; Loop until the user exits.
Do
Until GUIGetMsg() = $GUI_EVENT_CLOSE
GUIDelete()
EndFunc ;==>Example