Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
'Invalid Key' error in listview
Message
 
 
À
24/09/2003 13:06:46
Michael Harris
Harris and Harris Consultants
Temple Hills, Maryland, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Contrôles ActiveX en VFP
Divers
Thread ID:
00831903
Message ID:
00831961
Vues:
20
Michael,

Just use the whole sys(2015) value as your key. The problem is the activex control doesn't handle the situation where the key string is all digits.

>The following code is in the init section of a form which has an Imagelist control and a Listview control. This code is used to populate the listview control, but I keep getting an "invalid key' error.
>
>
>*** Loading Icons into Image List ***
>For I = 1 To lnButtons &&Number of buttons
> thisform.imglstButtons.ListImages.Add(,,Loadpicture(laButtons(i,1)))
>Endfor
>thisform.olecontrol3.Icons = thisform.imglstButtons
>**thisform.olecontrol3.SmallIcons = thisform.imglstButtons
>
>*** Loading imagelist icons into listview ****
>For I = 1 To thisform.imglstButtons.listImages.count
> **thisform.olecontrol3.ListItems.Add(,,
> lcKey = Right(Sys(2015),6)
>Error ----- thisform.olecontrol3.ListItems.Add(,,'',thisform.imglstButtons.ListImages(i).Picture)
>Endfor
>
>If anyone can help me and help me better understand how this error is caused, I would greatly appreciated.
df (was a 10 time MVP)

df FoxPro website
FoxPro Wiki site online, editable knowledgebase
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform