Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Dynamically adding icons in Imagelist Control
Message
From
06/03/2007 20:57:22
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
ActiveX controls in VFP
Title:
Dynamically adding icons in Imagelist Control
Miscellaneous
Thread ID:
01201325
Message ID:
01201325
Views:
92
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.com
Success 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.
Next
Reply
Map
View

Click here to load this message in the networking platform