ListView max. limits:
- max 259 Chars display in subitem (Windows' limit)
- max 4096 Chars stored in subitem (AutoIt's limit)
- max 4096 Chars get from subitem (AutoIt's limit)
$text = "ListView max. limits:" & @CRLF & _
" - max 259 Chars display in subitem (Windows' limit)" & @CRLF & _
" - max 4096 Chars stored in subitem (AutoIt's limit)" & @CRLF & _
" - max 4096 Chars get from subitem (AutoIt's limit)"
#AutoIt3Wrapper_UseX64=n
#include <GUIConstants.au3>
#include <GuiListView.au3>
$Form1 = GUICreate("ListView max. limits", 400, 400)
$ListView1 = GUICtrlCreateListView("#|Value", 2, 2, 396, 296)
GUICtrlCreateLabel($text, 20, 308, 376, 90)
GUISetState(@SW_SHOW)
Add(250, 0)
Add(260, 1)
Add(270, 2)
Add(300, 3)
Add(500, 4)
Add(1000, 5)
Add(2000, 6)
Add(4000, 7)
Add(4090, 8)
Add(4100, 9)
_GUICtrlListView_SetColumnWidth($ListView1, 0, 50)
_GUICtrlListView_SetColumnWidth($ListView1, 1, 300)
While 1
$msg = GUIGetMsg()
If $msg = $GUI_EVENT_CLOSE Then Exit
WEnd
Func Add($n, $i)
GUICtrlCreateListViewItem($n & '|' & Generate($n), $ListView1)
ConsoleWrite($n & ': ' & _GUICtrlListView_GetItemText($ListView1, $i, 1) & @CRLF)
EndFunc
Func Generate($len)
$s = '1234567890'
$ret = ''
For $i = 1 To $len/10
$ret &= $s
Next
Return $ret
EndFunc
MSDN:
https://docs.microsoft.com/en-us/windows/win32/api/commctrl/ns-commctrl-lvitema
In AutoIt's GUIListView UDF there is 4096 max. buffer length (for subitem text) hardcoded for all _GUICtrlListView_xxx() functions.