Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

DynamicForecolor overrided by SelectedItemForeColor 1

Status
Not open for further replies.

Paco75

Programmer
Oct 11, 2001
239
US
Hi,

I have a grid in with i set DynamicForecolor to set some colors depending on row values. I want to change the ForeColor of the selected row too but it is always the SelectedItemForeColor that is used.

Is there a way to disable or override this color value so i can have the same colors i put in DynamicForecolor?

thanks
 
Not sure I understand what you are trying to achieve. Are you saying you want the colour of the selected row to match the dynamic colour if the row meets the selection critiera, but not otherwise?

As far as I know, you can't to that. But I can't see why you would want to.

If I've misunderstood (which I probably have), perhaps you could clarify what you want to achieve.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips, training, consultancy
 
If I understand you correctly, Paco, you simply want the DynamicForecolor to work in every row, including the selected row. Then I think all you need to do is turn off the highlighting, that is set grid.Highlight=.F.

Bye, Olaf.
 
You are right Olaf that's what i want to do but even with grid.highlight=.F. the forecolor is always the same as SelectedItemForeColor.
 
sorry i mean HighlightfForeColor not SelectedItemForeColor. Even with grid.highlight=.F. the HighlightfForeColor override the color of the row (both forecolor and backcolor)
 
Have you set AllowCellSelection = .T. ? I think if not, the Highlightcoloring still is used, kind of a bug, if I don't overlook some other switch. HighlightStyle perhaps?

Bye, Olaf.

 
AllowSelection was at .F. when i turned it on everything is ok... so it is a VFP bug i guess. Will have to live with it :(

thanks for the help! :)
 
Agreed it's a bug, even if it's by design. Just because a grid does not allow editing there's no reason to highlight rows if grid.highlight=.f.

I tried a few things, but it seems hard to turn row highlighting completely off. If someone else has an idea, I'd also be interested.

Bye, Olaf.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top