rootx Posted May 10, 2015 Share Posted May 10, 2015 (edited) Local $hGui, $listview, $hImage Local $aArray = _FileListToArrayRec(IniRead($ini, "Name", "path", ""), "*file.exe", $FLTAR_FILES, 1, $FLTAR_SORT,$FLTAR_FULLPATH) $hGui = GUICreate("ImageList", 400, 300) $listview = _GUICtrlListView_Create($hGui, "", 2, 2, 394, 268) _GUICtrlListView_InsertColumn($listview, 0, "Programs", 300) $hImage = _GUIImageList_Create(32, 32) GUISetState() $fileArray = UBound($aArray) -1 For $y = 1 To $fileArray _GUIImageList_AddIcon($hImage, $IniRead($ini,$aArray[$y], "icon", "")) _GUICtrlListView_SetImageList($listview, $hImage, 1) _GUICtrlListView_AddItem($listview, $aArray[$y]) Next I would like to place an icon dynamically from an .ini file. From the .ini file the name of the program is loaded properly , but the icon remains the same, It loads only the icon of the first program. could Someone help me?ThanksMea culpa,$ico =_GUIImageList_AddIcon($hImage, $IniRead($ini,$aArray[$y], "icon", ""))_GUICtrlListView_SetImageList($listview, $hImage, 1)_GUICtrlListView_AddItem($listview, $aArray[$y],$ico) Edited May 11, 2015 by rootx Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now