Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
ForeColor for some, but not all, listbox items?
Message
From
19/02/1999 17:42:54
 
 
To
19/02/1999 16:42:34
John Streeter
Wanger Asset Management, L.P.
Chicago, Illinois, United States
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00189495
Message ID:
00189557
Views:
8
I don't know if anyone else has mentioned this, but there's a fancy listbox control in the files section. I think it's called BBListview. I can't say if it lets you do what you want, but there's so much stuff it does that there's a good chance it does that, too.

-Michelle







>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,
Previous
Reply
Map
View

Click here to load this message in the networking platform