by Jack Wheeler
| Jack (jwl1@jps.net) shows you how to highlight the active record on a browse. |
A client asked if I could Hi-light the current record of a browse to match all the fields on the forms. I was not aware that the active row of a browse was not hilighted when he called me. I soon fixed that! This technique works so well that I have included it on all my embedded browses! All my embedded browses now always show the active row highlighted in the same colors as all the fields on the form, as in this form below. A nice touch!
Here's what I did:
Here is where the color and font equations equations are found:
The session variable, Rec4, is reset in the OnArrive and the OnRowChange events of the browse in this script:
var->rec4=table.current().recno() browse2.refresh()
Here is the Color Equation:
If(recno()=var->rec4,"blue on eggshell","black on white")
Here is the Font Equation:
If(recno()=var->rec4,"MS Sans Serif, 11,B","MS Sans Serif, 10,")
This works wonderfully. Be careful: when you use the font equation, you must have a comma after your font size, otherwise your font equation will not work. Hope you enjoy this tip!
3/7/00
Don't forget, we need your feedback to make this site better!