Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Record pointer in grid without focus
Message
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00044481
Message ID:
00044599
Views:
36
>We're getting closer, I think. I made a form property gridcurrec, which I hope might have wide scope. My expression in .DynamicBackColor is recno()=THISFORM.gridcurrec. Somewhere, I need to put THISFORM.gridcurrec = recno('gridalias'). Grids don't have a .lostfocus event, and I think the controls inside the grid will think all RECNO()s in the grid are RECNO(), if you know what I mean.

As Edward says, use AfterRowColChange. Here's some more complete code (now that I have time)...this will use whatever selection colors the user has set.

*cursor/table is selected
*rgbColorB & F are user's default selected colors picked up from a textbox.
*The empty string says to do nothing (use your grid/column colors) if IIF is .F.

nRec = recno()
this.SetAll("DynamicBackColor",;
"IIF(recno()=nRec,rgbColorB,'')","Column")
this.SetAll("DynamicForeColor",;
"IIF(recno()=nRec,rgbColorF,'')","Column")
this.refresh


You can call this from outside grid as needed...
The Anonymous Bureaucrat,
and frankly, quite content not to be
a member of either major US political party.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform