Hi Guys, Im try to use the listview Control in VFP9. I've added the control together with an Imagelist control to hold the icons.
The problem is, when I run the form, the item in the listview does not contain any image. Below is the code that I placed in the Init Event of my form.
Note: I have not placed any Images in the designer of the Imaglist control. I want to assign the images dynamically.
ThisForm.oleImageList1.ListImages.Add(,JustStem('1st Module'),LoadPicture('FLGAUSTA.ICO'))
ThisForm.oleListView.Icons = ThisForm.oleImageList1
With ThisForm.oleListView.ListItems
loImageListItem = ThisForm.oleImageList1.Object.ListImages('1st Module')
liImageIndex = 0
thisform.olelistView.ListItems.Add(,'AFJK','1st Module',liImageIndex,liImageIndex)
ENDWITH
thisform.olelistView.Refresh()
Am I missing something?
Thanks in advance....
Music Rocks
www.musicreserve.blogspot.comSuccess is 1% Inspiration & 99% Perspiration
God Sometimes Delays His Help to Test Our Faith and Energize Our Prayers
Our Boat May Be Tossed While He Sleeps, But He Wakes Up Before it Sinks.