Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Grids and highlighting rows (yes again, darn it!)
Message
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00030281
Message ID:
00030347
Views:
40
>>>>I have yet to find a way to show which record you are on in a grid unless the grid has focus. The closes I have come is once the grid has focus and looses focus, the row that was last selected is a different color. But, if you navigate to a different row the colored row will not change until the grid has focus again.
>>>>
>>>>I've looked in the MS knowledge base. Lot of neat stuff there, but not this. Could anyone give me specific code or ideas on how to highlight a grid row that corresponds to the current record when navigating without the grid having focus?
>>>>
>>>>I feel like I'm searching for the Holy Grail and if someone doesn't help me I'll start on my Monty Python jokes.
>>>>
>>>>Michael G. Emmons
>>>
>>>You can do this in several ways. I store the record number of the cursor >the grid is based on, and increment it in the gotfocus event of all the >grid fields. In the init and when of the grid I have the following code,
>>
>>My whole point is that my grid _does not have focus_!
>>
>>>which results in the record you are on being highlighted in gray. >Onrecord is the variable that stores the cursor record number. If you >want this to work when you are off the grid, make it a method and just >set onrecord before calling it.
>>
>>Doesn't work this way. :(
>
>It doesn't matter if the grid has the focus or not. If you are off the >grid, simply update the variable to the correct record number, and the >highlight will change with it. I use this code in our app, and it works >perfewctly. Under our grid, we have a pageframe and when on the >pageframe, the current record in the grid remains highlighted.

I stand corrected! Happily, after doing some searching I found some code in my grid that was causing a problem. It works great! Amen! I send compliments in your general direction.

Michael G. Emmons

Michael G. Emmons
memmons@nc.rr.com
Previous
Reply
Map
View

Click here to load this message in the networking platform