I tried -1 and 999 (arbitrarily large). -1 still shows an image. 999 does not show an image,
but leaves a gap where an image would be is #999 existed.
but leaves a gap where an image would be is #999 existed.
If you do not want a gap, you will have to use the state imagelist. A quick glance at the Help
File seems to indicate that you cannot set a state imagelist using DDT.
A treeview control can have two imagelists, a normal imagelist and a state imagelist. You will have
to use SDK code to set the state imagelist. For example,
Code:
SendMessage hWndChild, TVM_SETIMAGELIST, %TVSIL_STATE, hImageList
Code:
szItem = "Nutmegs" ttvins.item.itemex.mask = %TVIF_TEXT OR %TVIF_STATE ttvins.item.itemex.stateMask = %TVIS_STATEIMAGEMASK ttvins.item.itemex.state = IndexToStateImageMask(%STATE_FORWARD) ttvins.item.itemex.pszText = VARPTR(szItem) ttvins.hParent = @phItem[0] ttvins.hInsertAfter = %TVI_LAST @phItem[1] = SendMessage(hWndChild, %TVM_INSERTITEM, 0, BYVAL VARPTR(ttvins))
Code:
szItem = "Bananas" ttvins.item.itemex.mask = %TVIF_TEXT ttvins.item.itemex.pszText = VARPTR(szItem) ttvins.hParent = @phItem[0] ttvins.hInsertAfter = %TVI_LAST @phItem[1] = SendMessage(hWndChild, %TVM_INSERTITEM, 0, BYVAL VARPTR(ttvins))
Leave a comment: