Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Grid: losing the column's DynamicBackColor
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00679377
Message ID:
00679557
Vues:
15
Nick:

Have implemented the gridhighlighter but still have the problem if i have code in the WHEN clause of a combobox thats used in the grid. I there is no code in the WHEN, it works (but row is NOT readonly, which is a problem).

In the OnPostSetDynamicColor method, i have the following:
lcHost = THIS.cHostname 
THISFORM.GrdTime.Column1.DynamicBackColor = "IIF( BETWEEN(tmptime.projfk,1,10), RGB(215,255,215), RGB(255,255,255))"
THISFORM.GrdTime.Column2.DynamicBackColor = "IIF( BETWEEN(tmptime.costfk,1,10), RGB(215,255,215), RGB(255,255,255))"
Have added the same code to OnPreHighlight_row and OnPostHighlight_row too.

In the WHEN clause of the combo thats located in column1, i have the code:
l_return = .t.
SELECT tmptime
IF BETWEEN(tmptime.projfk,1,10)
  wait window "tmptime.projfk = "+ALLTRIM(STR(tmptime.projfk))
  l_return = .f.
ENDIF
thisform.GridHighlighter1.OnPostSetDynamicColor() 
RETURN l_return
Wondering if u are able to use the WHEN method and NOT have it impact row highlighting.

Highlighter is great by the way. Very easy to implement.


>Hi Chris,
>
>You might want to try my Grid Highlighter, file#9798 in Downloads section.
>
>>I lose the DynamicBackColor for some rows of a grid due to the addition of code in the WHEN clause of a combobox in the gridcolumn.
>>
>>In a form's INIT, i have the following to color this a grid column for a few particular grid rows:
>>
>>THISFORM.GrdTime.Column1.DynamicBackColor = "IIF( BETWEEN(tmptime.projfk,6,11), RGB(215,255,215), RGB(255,255,255))"
>>
>>
>>I also need to makes these same rows readonly. In the WHEN clause of the gridcolumn's Combobox, i have the following:
>>
>>l_return = .t.
>>SELECT tmptime
>>IF BETWEEN(tmptime.projfk,6,11)
>>   l_return = .f.
>>ENDIF
>>RETURN l_return
>>
>>
>>This works fine with regard to being keeping the particular row cells readonly.
>>
>>The problem is that after i click on the combobox in column1 of the grid (cant change the value... which is good), the background turns white.
>>
>>I have tried placing the same "DynamicBackColor" command in the CLICK and LOSTFOCUS methods of the combo to turn back on the coloring of the row cells, without luck. Row colors remain white.
>>
>>If i comment out the code in the WHEN (and just RETURN), the color stays but the combo is no longer readonly.
>>
>>Any ideas?
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform