Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Changing the colours of items in a listbox
Message
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Changing the colours of items in a listbox
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP1
Network:
Windows 2000 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01037780
Message ID:
01037780
Views:
68
I have a list box which is populated by a cursor. The cursor has 2 fields namely Design Ref & Status. If I run my form I will see the following in the list box:
JKT001        Pending Release
JKT002        Submitted
TR002         Pending Release
What I would like to do is if the status is Pending Release then I want those items in the list box to be Yellow and if the status is Submitted I want is set to red.

Is this possible?

I have created the query with something like the following but this just shows them all as red!!
WITH thisform.pageframe1.page5.list1
	.ItemForeColor=IIF(curlist.fabstatus='Pending Release',RGB(255,0,0),RGB(128,128,128))
	.rowsourcetype=2
	.rowsource='curlist'
ENDWITH
Neil Lewis
IT R&D Manager
Velmore Ltd
Next
Reply
Map
View

Click here to load this message in the networking platform