Added support for colors in browse lines

Post Reply
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Added support for colors in browse lines

Post 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
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
mbelgrano
Posts: 52
Joined: Mon Oct 17, 2005 8:42 pm

Re: Added support for colors in browse lines

Post by mbelgrano »

Intresting
Post Reply