Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Grid Highlight Problem - Can you Duplicate it?
Message
De
14/09/2005 10:57:24
 
 
À
14/09/2005 09:48:43
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Versions des environnements
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Divers
Thread ID:
01049139
Message ID:
01049462
Vues:
19
I have tested this somewhat but am running into some issues. I need to accomplish the below (the goal and the issues):

1. There are many columns but column2 and column4 may have a dynamicbackcolor that is different than the default value of rgb(255,255,255).
2. The dynamicbackcolor is set just after the form and grid are instantiated by setting it to a statement such as the below example for column2 whose field is po_status:

IIF(!EMPTY(po_status),IIF(ASCAN(_vstatus,po_status)>0,IIF(!EMPTY(_vstatus(ASCAN(_vstatus,po_status)+1)),EVALUATE(_vstatus(ASCAN(_vstatus,po_status)+1)),RGB(255,255,255)),RGB(255,255,255)),RGB(255,255,255))

(Note: the _vstatus array exists with all possible values for po_status and the 2nd column in the array contains the custom dynamicbackcolor value such as RGB(128,0,0) or RGB(255,255,255) etc)

which determines what the dynamicbackcolor should be based on the value in the field for column2 for instance. (The dynamicbackcolor is working correctly in all columns and in all rows except when highlighting is involved)

3. When the user clicks on a row in the grid, if there is a special dynamicbackcolor set for that column that evaluates to anything other than the default grid backcolor, the highlight over that cell should not show, but rather display the custom dynamic backcolor. If the dynamicbackcolor matches the grid backcolor or is empty, then the cell should be the highlight color (to emulate highlight).

4. This should theoretically occur in the afterrowcolchange so the newly selected row can have its color set correctly to emulate a highlighted row with persistence (except for custom dynamicbackcolor cases) and the previous selected row (when the form first loads the first record but afterwords it could be any row) could be set back to it non-highlighted color.

The problem I run into doing it this way is that I need to know the old row that was selected and the currently active row in afterrowcolchange to accomplish this. I also need to step through all columns in the grid at this point (which I can do but seems to exceed some program call limits when I call a method to do this)


>Tracy,
>
>I'm jumping into your thread without fully reviewing your entire code, so pardon me if this is a repeat or an irrelevant idea.
>
>Could you use drop the use of the row highlighter altogether and instead create a single DynamicBackColor function called by all your columns that returns either a special indicator color or a color that matches what your normal row highlighter would have returned?
>
>Just an idea,
>
>Malcolm
.·*´¨)
.·`TCH
(..·*

010000110101001101101000011000010111001001110000010011110111001001000010011101010111001101110100
"When the debate is lost, slander becomes the tool of the loser." - Socrates
Vita contingit, Vive cum eo. (Life Happens, Live With it.)
"Life is not measured by the number of breaths we take, but by the moments that take our breath away." -- author unknown
"De omnibus dubitandum"
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform