Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Problem with DynamicBackColor
Message
From
10/11/2020 16:00:56
 
 
To
10/11/2020 11:21:18
Lutz Scheffler
Lutz Scheffler Software Ingenieurbüro
Dresden, Germany
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01677077
Message ID:
01677095
Views:
57
Hi Lutz,

That's it! When I queried the .DynamicBackColor with no records in the grid, that property was absolutely blank. The code that sets these properties is called from the grid's .Init(); it seems that if there are no records in the view, the dynamic back color string is dumped by VFP. What is weird is that the grid is always instantiated first, the view is populated and then the view is bound programmatically to each column control. This happens whether the view contains records from its requery or not. Unless I am on the wrong track, it would seem that when the actual "show" of the grid happens (or maybe the first .Refresh() that fires), VFP drops this dynamic stuff to speed things up?

If someone has a better idea what is happening, let me know. For now, it works to just re-fire the method of the grid that contains the code that sets the .dynamicbackcolor after a blank record has been added to the grid.

Thanks a lot.
Albert

>Yeah, not much fun with views, then.
>
>Just a question, have you looked up the DYNAMIC* prop of the column? Just like
>
>suspend 
>?thisform.grid.column1.DYNAMICBACKCOLOR
>
>if the stuff is not working?
>
>So, if this is empty, on the place you set the recordsource of the grid, just add something like
>
>grid.SETALL("DYNAMICBACKCOLOR",lcDynamicStuff,'Column')
>
>
>
>
>>Yes, I am referring to the alias of the view. This form has identical "blocks" of controls e.g. "Quote #1", "Quote #2", "Quote #3" etc. as the user can keep adding quotes. They use the same view with a different alias each time e.g. "QuoteHeader1", "QuoteHeader2" etc. ; it works fine except for this one small issue (that others have not even noticed but I have). After instantiating a new container - which contains the grid - then I set the record source of every control in code to the new alias. Once that is done, the cursor is placed in the first editing control within the container (not the grid) for them to input the name of the quote e.g. "Lifetime annuity at $200k").
>>
>>Re CA's: this is a legacy application that I have been told to not make any "big" changes to it - so they are not going to pay me to switch to CA's - should have tried to get approval for that years ago but didn't.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform