Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
DynamicBackColor not working
Message
From
28/10/2008 12:56:30
Jay Johengen
Altamahaw-Ossipee, North Carolina, United States
 
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Vista
Network:
Windows 2008 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01357721
Message ID:
01357740
Views:
22
The cursor is created in the INIT prior to the code block.

When I do what you suggested, there are no records in the grid.

>Do you have your cursor available in form's Load? Can you specify the alias in the Property sheet for the grid (e.g. comment out first 2 lines in your code) and also just in case comment out the last line?
>
>See if this helps. Also check if you have any extra code in Form's Refresh or have timer running.
>
>>In the form's INIT.
>>
>>>Where did you put this code? Can you verify that at the moment the form is activated the DynamicBackColor is still correct? Put it in Debugger Watch window or just add a messagebox with it.
>>>
>>>>I like that code, but the records still do not change color. The logic seems correct - I pulled it out and ran it against the actual cursor in the command window - but the grid does not seem to be affected.
>>>>
>>>>This is the full block I'm using:
>>>>
>>>>	.Fm_CONTAINER1.grdWorkListXMLCursor.RecordSource = ''
>>>>	.Fm_CONTAINER1.grdWorkListXMLCursor.RecordSource = 'WorkListXMLCursor'
>>>>	TEXT TO lcDynBackColor NOSHOW PRETEXT 15
>>>>	     ICASE(UPPER(ALLTRIM(WorkListXMLCursor.GroupHeading)) == [RECEIVER]                     ,  RGB(192, 241, 190),
>>>>	           INLIST(UPPER(ALLTRIM(WorkListXMLCursor.GroupHeading)), [SUBSCRIBER], [DEPENDENT]),  RGB(211, 210, 240),
>>>>	           RGB(249, 223, 223))
>>>>	ENDTEXT
>>>>	.Fm_Container1.grdWorkListXMLCursor.SetAll([DynamicBackColor], lcDynBackColor, [Column])
>>>>	.Fm_CONTAINER1.grdWorkListXMLCursor.Refresh
>>>>	.Fm_Container1.grdWorkListXMLCursor.Top = 181
>>>>	.Fm_Container1.grdWorkListXMLCursor.Left = 15
>>>>	.Fm_Container1.grdWorkListXMLCursor.Height = 236
>>>>	.Fm_Container1.grdWorkListXMLCursor.Width = 660
>>>>	.Fm_Container1.grdWorkListXMLCursor.zorder(0)
>>>>
>>>>
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform