xBrowse : Switch-back from Col to Row-preview => solved !

xBrowse : Switch-back from Col to Row-preview => solved !

Postby ukoenig » Sat Aug 30, 2008 3:39 pm

Hello,

after some more tests, i found the solution, how
to switch from Row- to Col-preview and back.

Image

Image

it has to be done in a complete different way.

Code: Select all  Expand view

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

// 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 :lol:
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.
User avatar
ukoenig
 
Posts: 4043
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany

Postby Antonio Linares » Sun Aug 31, 2008 6:40 pm

Uwe,

Thanks for sharing it! :-)
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42080
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 51 guests