after some more tests, i found the solution, how
to switch from Row- to Col-preview and back.
it has to be done in a complete different way.
- Code: Select all Expand view RUN
........
........
// The browser shows the Row-selection
// Define alternating row colors
aClrCol := { { ROW_TEXT, ROW_COL1 }, { ROW_TEXT, ROW_COL2 } }
oLbx0:bClrStd := { || aClrCol[ oLbx0:KeyNo % 2 + 1 ] }
oLbx0:CreateFromResource( 110 )
// --------------- Button for COLUMN - Display ( RED ) --------------
REDEFINE BUTTONBMP oBtn11 ID 20 OF oDlg ;
ACTION ( oLbx0:aCols[2]:bClrStd := { || { CLR_WHITE, 128 } }, ;
oLbx0:Refresh() ) ;
BITMAP "Magic" PROMPT " Col-Select" TEXTRIGHT
oBtn11:cToolTip = { "Changing browser" + CRLF + ;
"Column-Color","Column-Color", 1, CLR_BLACK, 14089979 }
// ------- Button for changing back to ROW-Display -----------------------
// you cannot call the Row- display again for repainting,
// that doesn't work and the red Column is still visible
// ( the Rows are not repainted ).
// To show only the Row-colors again, you have to use
// the < alternating ROW colors > and repaint the red Column No. 2.
// That works perfect.
REDEFINE BUTTONBMP oBtn10 ID 10 OF oDlg ;
ACTION ( aClrCol := { { ROW_TEXT, ROW_COL1 }, ;
{ ROW_TEXT, ROW_COL2 } }, ;
oLbx0:aCols[2]:bClrStd := { || aClrCol[ oLbx0:KeyNo % 2 + 1 ] }, ;
oLbx0:Refresh() ) ;
BITMAP "Magic" PROMPT " Row-Select" TEXTRIGHT
oBtn10:cToolTip = { "Changing Browser" + CRLF + ;
"Row-Colors","Row-Color", 1, CLR_BLACK, 14089979 }
Regards
Uwe