The control your looking for is the active X ListView Control.
You may programmatically add it to your form:
MyObject.AddObject('oListViewControl','OLECONTROL','COMCTL.ListView.1')
The list view control takes images lists for small and large icons
allowing total control over the icons displayed in any view.
To programmatically create the imagelists and attach them to the listview:
*-- Small Icons:
lcPicture = 'CLOSED.BMP'
lpPicture = LOADPICTURE(lcPicture)
This.AddObject('oListViewSmallIcon','OLECONTROL','COMCTL.ImageListCtrl.1')
This.oListViewSmallIcon.ListImages.ADD(1,,lpPicture)
*-- Large Icons:
This.AddObject('oListViewLargeIcon','OLECONTROL','COMCTL.ImageListCtrl.1')
lcPicture = 'FOLDER01.ICO'
lpPicture = LOADPICTURE(lcPicture)
This.oListViewLargeIcon.ListImages.ADD(1,,lpPicture)
This.oleListView.View = 0
This.oleListView.SmallIcons = This.oListViewSmallIcon.Object
This.oleListView.Icons = This.oListViewLargeIcon.Object
Do not included the icons,bmps in the project or loadpicture will return
an invalid file format - This is a known Visual Fox Bug!
Good Luck
Jonathan A. Newell
jnewell@earthlink.net
JJ-
One man gathers what another man spills.......