i noticed a problem from changing Row- to Col-preview.
Row-Colors
Column-Colors
The switching works only once. I can switch from Row-colors to Col-colors.
To switch back from Cols to Rows, doesn't work.
The Browser shows still the Col-colors after switching.
- Code: Select all Expand view
....
....
.... THE SWITCH SELECTION ------
oLbx14 := TXBrowse():New( oFld:aDialogs[3] )
oLbx14:nMarqueeStyle := MARQSTYLE_HIGHLROW
oLbx14:nColDividerStyle := LINESTYLE_BLACK
oLbx14:nRowDividerStyle := LINESTYLE_BLACK
oLbx14:SetArray( aBRSTYLE1 )
oLbx14:aCols[ 1 ]:cHeader = Padr("No.", 3)
oLbx14:aCols[ 2 ]:cHeader = Padr("Style", 20)
oLbx14:nRecSelColor = 15512898
oLbx14:bClrSelFocus = { || { 16777215, 15512898 } }
oLbx14:bClrSel = { || { 16777215, 15512898 } }
oLbx14:lHScroll := .F.
oLbx14:lVScroll := .F.
oLbx14:lFooter := .T.
oLbx14:nFooterHeight := 15
oLbx14:bLClicked := { | nRow, nCol | ( BR_STYLE1 := oLbx14:nRowSel, ;
IIF( BR_STYLE1 = 1, BRW_ROWS(oLbx0), BRW_COLS(oLbx0) ) ) }
oLbx14:aCols[ 2 ]:AddResource("Horizont")
oLbx14:aCols[ 2 ]:AddResource("Vertikal")
oLbx14:aCols[ 2 ]:bBmpData := {|| oLbx14:nArrayAt }
oLbx14:aCols[ 2 ]:bStrData := {|| oLbx14:aRow[2] }
oLbx14:nArrayAt := 1
oLbx14:nRowSel := 1
oLbx14:CreateFromResource( 140 )
....
....
....
// ----------------------------------------
FUNCTION BRW_ROWS(oLbx0)
oLbx0:bClrStd := {|| IF ( EVAL ( oLbx0:bKeyno, NIL, oLbx0 ) %2 == 0, ;
{ ROW_TEXT, ROW_COL1 }, { ROW_TEXT, ROW_COL2 } ) }
oLbx0:Refresh()
MsgAlert( "Row-Colors","Attention" )
RETURN( NIL )
// ----------------------------------------
FUNCTION BRW_COLS(oLbx0)
oLbx0:aCols[ 1 ]:bClrStd := {|| { ROW_TEXT, ROW_COL1 } }
oLbx0:aCols[ 2 ]:bClrStd := {|| { ROW_TEXT, ROW_COL2 } }
oLbx0:aCols[ 3 ]:bClrStd := {|| { ROW_TEXT, ROW_COL1 } }
oLbx0:Refresh()
MsgAlert( "Column-Colors","Attention" )
RETURN( NIL )
// -------- a TEST-FUNCTION --------------------------------
FUNCTION SWITCHTEST(oLbx0)
oLbx0:bClrStd := {|| IF ( EVAL ( oLbx0:bKeyno, NIL, oLbx0 ) %2 == 0, ;
{ ROW_TEXT, ROW_COL1 }, { ROW_TEXT, ROW_COL2 } ) }
oLbx0:Refresh()
MsgAlert( "ROW" )
oLbx0:aCols[ 1 ]:bClrStd := {|| { ROW_TEXT, ROW_COL1 } }
oLbx0:aCols[ 2 ]:bClrStd := {|| { ROW_TEXT, ROW_COL2 } }
oLbx0:aCols[ 3 ]:bClrStd := {|| { ROW_TEXT, ROW_COL1 } }
oLbx0:Refresh()
MsgAlert( "COL" )
// ----- From this point no change !!!! --------------
oLbx0:bClrStd := {|| IF ( EVAL ( oLbx0:bKeyno, NIL, oLbx0 ) %2 == 0, ;
{ ROW_TEXT, ROW_COL1 }, { ROW_TEXT, ROW_COL2 } ) }
oLbx0:Refresh()
MsgAlert( "ROW" )
oLbx0:aCols[ 1 ]:bClrStd := {|| { ROW_TEXT, ROW_COL1 } }
oLbx0:aCols[ 2 ]:bClrStd := {|| { ROW_TEXT, ROW_COL2 } }
oLbx0:aCols[ 3 ]:bClrStd := {|| { ROW_TEXT, ROW_COL1 } }
oLbx0:Refresh()
MsgAlert( "COL" )
RETURN( NIL )
Regards
Uwe