FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour xBrowse : Switch-back from Col to Row-preview => solved !
Posts: 4043
Joined: Wed Dec 19, 2007 06:40 PM
xBrowse : Switch-back from Col to Row-preview => solved !
Posted: Sat Aug 30, 2008 03:39 PM
Hello,

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.

........ 
........

// 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 :-)
Since 1995 ( the first release of FW 1.9 )

i work with FW.

If you have any questions about special functions, maybe i can help.
Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM
xBrowse : Switch-back from Col to Row-preview =&gt; solved !
Posted: Sun Aug 31, 2008 06:40 PM

Uwe,

Thanks for sharing it! :-)

regards, saludos

Antonio Linares
www.fivetechsoft.com

Continue the discussion