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:
00044864
Views:
41
>>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...
>When I tried your code I got an "Expression is invalid. Use a valid expression for DynamicForeColor property" and a similar one for DynamicBackColor. Since I use vfp3 and could find no documentation for rgbColorF and B, I replaced them with rgb(50,50,50) and rgb(150,150,150). Same error. What's its problem?

The missing piece is that I set (you can make form properties, I'm generalizing here, rgbColorF & B are just user variables):

rgbColorF = thisform.textbox.selectedforecolor
rgbColorB = thisform.textbox.selectedbackcolor

from any textbox with default selected colors, in form init()

This way you set the highlight to be the same as default used everywhere else...
The Anonymous Bureaucrat,
and frankly, quite content not to be
a member of either major US political party.
Previous
Reply
Map
View

Click here to load this message in the networking platform