Page 1 of 1

DCBROWSE row cursor hilite foreground color express++ 258

Posted: Tue Jan 29, 2013 11:01 am
by gnewcomb
The below sample program does not show the default DC_BrowPres() row hilite color of white/blue correctly. The white foreground color is not showing. Is there a workaround?

Code: Select all

#INCLUDE "dcdialog.CH"
#INCLUDE "GRA.CH"

PROCEDURE Main()

LOCAL aBrowPres, GetList[0], oBrowse, aDir

aDir := Directory()

aBrowPres := DC_BrowPres()

@ 0,0 DCBROWSE oBrowse DATA aDir SIZE 20,20 FIT ;
      PRESENTATION aBrowPres ;
      COLOR {|| { GRA_CLR_BLUE,GRA_CLR_WHITE } } 

DCBROWSECOL ELEMENT 1 HEADER 'File Name' PARENT oBrowse WIDTH 10

DCBROWSECOL ELEMENT 2 HEADER 'File Date' PARENT oBrowse WIDTH 10

DCREAD GUI FIT TITLE 'Presentation Test'

RETURN


PROC appsys ; return

Re: DCBROWSE row cursor hilite foreground color express++ 25

Posted: Tue Jan 29, 2013 1:28 pm
by digitsoft

Code: Select all

       @ 7.0,0.6 DCBROWSE oFacturaPendiente  DATA aFacturaPendiente  SIZE 72.3,10.2  ; 
                 PARENT oMyGroup2 ;
                 COLOR {||IIF(oFacturaPendiente:arrayElement%2==0,{nil,XBPSYSCLR_INFOBACKGROUND},{nil,GraMakeRGBColor({230,252,213})})}
Watch this Code
Paulino Nolberto

Re: DCBROWSE row cursor hilite foreground color express++ 25

Posted: Tue Jan 29, 2013 4:28 pm
by gnewcomb
Attached are screen shots of the different behavoir between 257 and 258 on my system.

Re: DCBROWSE row cursor hilite foreground color express++ 25

Posted: Tue Jan 29, 2013 6:06 pm
by rdonnay
This will work with all versions of Xbase++ and eXpress++:

Code: Select all

@ 0,0 DCBROWSE oBrowse DATA aDir SIZE 20,20 FIT ;
      PRESENTATION aBrowPres ;
      COLOR {|| { GRA_CLR_BLUE,GRA_CLR_WHITE,GRA_CLR_WHITE,GRA_CLR_BLUE } }
// J. Duijf 11-03-2011
// Workaround for PDR 6365
// The colorBlock should return nil or a 4 element array to prevent an incorrect
// Hilite forground color.
// {CellFGColor,CellBGColor,CellHiliteFGColor,CellHiliteBGColor}
// The highlite colors come from the presentation parameters.
// If undefined, the default BG/FG hilite colors are BLUE/WHITE