﻿id	summary	reporter	owner	description	type	status	milestone	component	version	severity	resolution	keywords	cc
1954	ListViewItem returns 0 (failure) even though it populates the ListView	anonymous	Jon	"When more sub-items are specified in the “text” parameter of function GUICtrlCreateListViewItem, the list view is populated with the sub-items that fit the ListView, but the control ID returned is 0.

The following script demonstrates this anomaly.  In particular, $item2 is assigned 0 because it has one too many sub-items.  The ID’s of each ListViewItem are shown in the input box.


{{{
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>

Local $listview, $item1, $item2, $item3, $input1, $msg
GUICreate(""listview items"", 220, 250, 100, 200, -1, $WS_EX_ACCEPTFILES)

$listview = GUICtrlCreateListView(""col1  |col2|col3  "", 10, 10, 200, 150);,$LVS_SORTDESCENDING)
$item1 = GUICtrlCreateListViewItem(""1a|1b|1c"", $listview)
$item2 = GUICtrlCreateListViewItem(""2a|2b|2c|2d"", $listview)
$item3 = GUICtrlCreateListViewItem(""3a|3b|3c"", $listview)
$input1 = GUICtrlCreateInput(""$item1 = "" & $item1 & "",   $item2 = "" & $item2 & "",   $item3 = "" & $item3, 10, 200, 200, 15)
GUISetState()

Do
Until GUIGetMsg() = $GUI_EVENT_CLOSE

}}}
"	Bug	closed	3.3.9.21	AutoIt	3.3.6.1	None	Fixed		
