×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Grid Row Highlighting...

Grid Row Highlighting...

Grid Row Highlighting...

(OP)
Hi guys

Have been going round in circles with this problem, but am certain it must be an easy fix!

Basically I have a 'read-only' grid that has the rows coloured differently depending on certain criteria. So far, so good :)

All I am trying to accomplish is to have the 'frame' around the row shown on the on the selected record. I thought that Highlight = .F., HighlightRow = .T. and AllowCellSelection = .F. would be all I would need.

But it would appear that if you set AllowCellSelection = .F., the entire row is highlighted with a solid colour, which is no good as I need to be able to see the colour the row has been set to. AllowCellSelection = .T. gives me the outline I am after, but allows the use to click on a cell which is then highlighted with a different colour (I added RETURN .F. to the WHEN event of the text boxes to try and prevent this but that did not work).

What am I missing?? This is VFP8 if it matters!

thanks
Neil

I like work. It fascinates me. I can sit and look at it for hours...

RE: Grid Row Highlighting...

Neil,

Have you tried the different settings of the HighlightStyle property? And also HighlightForeColor and HighlightBackColor?

Between them, they might be able to give you the effect you are looking for.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips and downloads

RE: Grid Row Highlighting...

(OP)
Hi Mike

Yeah, I fiddled with all the different settings/properties but no combination (unless I have missed one!) seems to do what I need.

Oh well, it's not a show stopper just annoying :)

Thanks
Neil

I like work. It fascinates me. I can sit and look at it for hours...

RE: Grid Row Highlighting...

If the purpose of the "frame" is to show the user which row is selected, maybe you can find some other way of doing that. For example, show the selected row in bold; or add a little graphic device such as a blob, and show this in the left-most column for the selected row.

Just a thought. It probably won't look as good as the frame.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips and downloads

RE: Grid Row Highlighting...

(OP)
Hi Mike

I have found a way round! Quite simple in the end thankfully :)

In the AfteRowColChange event, I just added code to change the HighlightBackColor to that of the row by using the same criteria as the DynamicBackColor change for the grid.

I now have the frame and no cell selection.

thanks
Neil

I like work. It fascinates me. I can sit and look at it for hours...

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close