Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Listbox picture property
Message
De
21/01/2002 17:26:33
 
 
À
21/01/2002 17:02:58
Jerry Tovar
Dana Corporation Dana It
Maumee, Ohio, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00607926
Message ID:
00608050
Vues:
28
Hello Jerry.

This works but when I click on the list, all the pictures change to the default picture. As long as I don't click on the list, each item can have a different picture.

From Chapter 5 of 1001 Things You Wanted to Know About VFP

Visual FoxPro's standard behavior is to de-select all list box items when it gets focus. It seems that this default behavior also resets all of the pictures in the list. Because we do not want our multi-select list box to exhibit this type of amnesia, we call our its custom RefreshList() method from its GotFocus() method:
LOCAL lnItem
WITH This
  FOR lnItem = 1 TO .ListCount
    .Picture[ lnItem ] = IIF( .aSelected[ lnItem ], 'CheckBx.bmp', 'Box.bmp' )
  ENDFOR
ENDWITH		
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform