Page 1 of 1

Added support for colors in browse lines

Posted: Wed Aug 10, 2011 3:30 pm
by Antonio Linares
Implemented colors support for browse lines, both background and text, example:

Code: Select all

#include "FiveLinux.ch"

REQUEST DBFCDX

function Main()

   local oWnd, oBrw

   USE customer VIA "DBFCDX"

   DEFINE WINDOW oWnd TITLE "Testing Browses" SIZE 522, 317

   @ 2, 2 BROWSE oBrw OF oWnd ;
      HEADERS "First", "Last", "Street", "City", "State", "Zip" ;
      FIELDS  First, Last, Street, City, State, Zip

   oBrw:nClrPane = { | nRow, lSelected | If( ! lSelected, If( nRow % 2 == 0, CLR_GREEN, CLR_WHITE ), nil ) } 
   oBrw:nClrText = { | nRow, lSelected | If( ! lSelected, If( nRow % 2 == 0, CLR_YELLOW, CLR_BLACK ), nil ) } 

   @ 28, 2 BUTTON "_Ok" OF oWnd ACTION oWnd:End()

   ACTIVATE WINDOW oWnd

return nil
Image

Re: Added support for colors in browse lines

Posted: Fri Aug 12, 2011 10:29 pm
by mbelgrano
Intresting