Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Adding Images to the ImagesList control at Run-time
Message
De
19/09/1998 13:35:31
 
 
À
19/09/1998 07:21:46
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Divers
Thread ID:
00138618
Message ID:
00138665
Vues:
12
>I am trying to give the end-user to add items (w/images) to a treeview control at run-time. Is there a method associated with the ImagesList control which can be called from VFP to add a image (and it's associated key name). It would be nice if there were some sort of documentation on this and other OLE controls in general.
>Any help would be greatly appreciated.
>
>Thanks,
>GB

This is actually one of the BETTER documented controls, but you do have to hunt around through the help, very poorly organized.

To add images at run time:

Set the ImageList controls .ImageHeight and .ImageWidth properties first.
ImageListControl.ListImages.ImageHeight = 16
ImageListControl.ListImages.ImageWidth = 16

Now add images:

ImageListControl.ListImages.Add([index#],[key text],LoadPicture('path to icon'))

They recommend skipping the index parameter if you're adding/removing images at run-time.

ImageListControl.ListImages.Add(,"My Key",LoadPicture("icons\myicon.ico"))

HTH
Fred
Microsoft Visual FoxPro MVP

foxcentral.net
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform