Information générale
Catégorie:
Gestionnaire d'écran & Écrans
Thanks for the response, James. I have the feeling that I am missing something simple ... I'm running the following code from the command line:
oForm = createobject("form")
oForm.show()
oForm.AddObject("lstTest","listbox")
oForm.lstTest.visible = .T.
oForm.lstTest.AddItem( "Hello (RED)" )
oForm.lstTest.AddItem( "Hello (GREEN)" )
oForm.lstTest.AddItem( "Hello (BLUE)" )
The following command should change the second row to green:
oForm.lstTest.ItemForeColor(2) = RGB(0,255,0)
but it changes all rows. I have also tried using the following command to make sure that the default setting for RowSourceType is, in fact, present:
oForm.lstTest.RowSourceType = 0
This does not seem to have any effect. Any thoughts on what I'm am overlooking? This has to be simple, right?
>
>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,
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement