Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
ForeColor for some, but not all, listbox items?
Message
De
19/02/1999 16:27:12
 
 
À
19/02/1999 16:10:36
John Streeter
Wanger Asset Management, L.P.
Chicago, Illinois, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00189495
Message ID:
00189514
Vues:
14
>Is there a simple way to change the color property of selected items in a listbox? In other words, all items are blue and I want to turn items #3, 4 and 7 to red. Can this be done?
>
>I have noticed that the ItemForeColor propery appears to take a subscript / index, but seems to have no effect. That is, .ItemForeColor(3) = RGB() works in the sense that it does not raise an error. But, it doesn't work in the sense that the subscript is ignored and the color is applied to all list members.

John,

Setting individual list item forecolors works only if your rowsourcetype is 0 and your items are added with AddItem(). (It may also work with rowsourcetype 1 -- but I have not tried i -- but it should)

If your rowsourcetype is an array, cursor etc, then setting any item's forecolor sets the forecolor of all of the items.

Regards,
Jim Edgar
Jurix Data Corporation
jmedgar@yahoo.com

No trees were destroyed in sending this message. However, a large number of electrons were diverted from their ordinary activities and terribly inconvenienced.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform