Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SetAll and DynamicBackColor problem
Message
 
À
22/09/2005 14:10:15
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Versions des environnements
Visual FoxPro:
VFP 7 SP1
OS:
Windows XP SP2
Database:
Visual FoxPro
Divers
Thread ID:
01052066
Message ID:
01052110
Vues:
16
I got it. Here is the solution:

* the code stays in the AfterRowColChange event
* Set the column's Sparse property to .F.
* In the textbox GotFocus event, put this code:
This.Parent.Parent.Refresh()
This does everything I wanted. The DynamicBackColor doesn't vanish when entering the grid (selection cursor), it follows the current record when moving up or down in the grid, it appears on the first row of the grid when the grid is initialized and you first see it.

Thanks for your help in getting my thoughts pointed in this direction!

Dana
>Sorry, no.
>
>>Unfortunately I tried that and got poor results. The dynamic back color shows until I actually enter the grid, then it goes white, and if I move to a different record I see a flash of the color but it instantly goes away. I thought I had it, too. This happens regardless of where the code is.
>>
>>I tried turning off Highlight and HightlightRow, but that didn't help. Maybe if I turn off SelectOnEntry?
>>
>>Any ideas?
>>
>>Dana
>>
>>>I am glad that you found a solution. And, as Sergey mentioned, be sore to move the SETALL code to the init of the grid where it belongs.
>>>
>>>>Tore,
>>>>
>>>> You put me on a track that I hadn't thought about. I put the "fully qualified path", ie. ThisForm.pgfBase.Page2.grdPromoDestinations.SetAll(... and that worked.
>>>>
>>>>Thanks for your help!
>>>>
>>>>Dana
>>>>
>>>>>I added some more text to my message, after you read it. When the DynamicBackColor expression is evaluated, it does not see the "With this" since it is not valid anymore.
>>>>>
>>>>>>I would think that it should not be an issue, since the code is within the
>>>>>>
>>>>>>WITH This
>>>>>>...
>>>>>>ENDWITH
>>>>>>
>>>>>> structure, but I'll check that out.
>>>>>>
>>>>>>Dana
>>>>>>>>WITH This
>>>>>>>> .Tag = STR(RECNO('vSbvPromoDestinations'))
>>>>>>>>
>>>>>>>> .SetAll("DynamicBackColor", "IIF(RECNO('vSbvPromoDestinations') = VAL(ALLTRIM(.Tag)), ;
>>>>>>>> RGB(255,255,128), RGB(255,255,255))", "Column")
>>>>>>>>
>>>>>>>> .Refresh()
>>>>>>>>*.colAirportCode.DynamicBackColor = RGB(0,128,255)
>>>>>>>>ENDWITH
>>>>>>>>
>>>>>>>>
>>>>>>>>Please help, it's driving me nuts!
>>>>>>>>
>>>>>>>>Thanks,
>>>>>>>>Dana
>>>>>>>
>>>>>>>My guess is the missing "this"
>>>>>>>WITH This
>>>>>>>	.Tag = STR(RECNO('vSbvPromoDestinations'))
>>>>>>>
>>>>>>>	.SetAll("DynamicBackColor", "IIF(RECNO('vSbvPromoDestinations') = VAL(ALLTRIM(this.Tag)), ;
>>>>>>>		RGB(255,255,128), RGB(255,255,255))", "Column")
>>>>>>>
>>>>>>>	.Refresh()
>>>>>>>*.colAirportCode.DynamicBackColor = RGB(0,128,255)
>>>>>>>ENDWITH
Where's the damned Any Key?...too late
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform