Nuevas datas
- Code: Select all Expand view RUN
DATA nRowZebra AS NUMERIC INIT 0
DATA aClrZebra
DATA lZebra AS LOGICAL INIT .f.
Asignamos asi al crear el xbrowse:
- Code: Select all Expand view RUN
::lZebra := .t.
::aClrZebra := { { 0, RGB(255,255,255) }, { 0, rgb(237,243,254) } }
::bClrStd := { || ::aClrZebra[ ::nRowZebra %2 + 1 ] }
o se puede crear un metodo SetZebra si se quiere ...
- Code: Select all Expand view RUN
METHOD SetZebra( lZebra, aClrZebra ) CLASS TXBrowse
DEFAULT lZebra := .t.
DEFAULT aClrZebra := { { 0, RGB(255,255,255) }, { 0, rgb(237,243,254) } }
::lZebra := lZebra
if ::lZebra
::aClrZebra := aClrZebra
::bClrStd := { || ::aClrZebra[ ::nRowZebra %2 + 1 ] }
else
::bClrStd := {|| { CLR_BLACK, GetSysColor( COLOR_WINDOW )} }
endif
Return nil
solo dos cambios en el codigo xbrowse ....
- Code: Select all Expand view RUN
METHOD Paint() CLASS TXBrowse
......
do while nRowPos <= nMaxRows
// We must also paint some times after the last visible column
IF ::lZebra // nuevo
::nRowZebra := nRowPos // nuevo
endif // nuevo
if hSelBrush != nil
.....
METHOD FullPaint() INLINE ( ::lTransparent .or. ::lMergeVert .or. ;
::nMarqueeStyle == MARQSTYLE_HIGHLWIN7 .OR. ::lZebra )
y listo ....