Hello Roger,
The last few days i have been strugling to get reliable zebra stripes in a DC_browse.
The main problem was when i was browsing a database with deleted records.
The striping was not consitent.
I made some modifications in _dcxbrow.prg of build 254.
You can find the changes in the attached file if you look for "7-03-2010".
The express browse looks now as follows:
Code: Select all
@ nLine , nCol1 DCBROWSE .... ;
COLOR {|o|Jd_BrowseZebraColor(o)}
Code: Select all
Function Jd_BrowseZebraColor(oBrowse)
LOCAL aRet := {GRA_CLR_BLACK,GRA_CLR_WHITE} // Default black/white
LOCAL oColumn := oBrowse:GetColumn(1) // First column (if any)
if ValType(oColumn) = "O"
if oColumn:IsderivedFrom("DC_XbpColumn")
if oColumn:EvenRow
aRet := {GRA_CLR_BLACK,GraMakeRGBColor({255,255,170})}
else
aRet := {GRA_CLR_BLACK,GraMakeRGBColor({159,231,176})}
endif
endif
endif
Return aRet
Feel free to add this to Express, if this does not break any code.
The only thing i am not absolutely 100% sure of, is passing the Browse object as a parameter to the color block.
Please let me know what you make of this.
Well, I did my testing and it appears to work ok, so I'm planning to include this in the next release.
Here is the latest _DCXBROW.PRG with Jack's mods :
http://bb.donnay-software.com:8080/support/_dcxbrow.prg