Page 3 of 3

Re: DCBROWSE, visual styles and foreground colors

Posted: Wed Sep 29, 2010 3:44 am
by Zdeno Bielik
Tom wrote: ... It also sets the foreground color to GRA_CLR_BLUE for the first caption. You can easily derive this from the last sample....
Hi,

I just little played with code and added simply support for BLUE color for first lines in rows and for correct displaying.


...
IF CrLf() $ xData // 2 lines (just a sample!)

xData1 := Left(xData,At(CrLf(),xData)-1) // top portion
xData2 := StrTran(xData,xData1+CrLf(),'') // bottom portion

oPS:setColor( GRA_CLR_BLUE ) // <<< added
GraCaptionStr( oPS, aInfo[ XBP_DRAWINFO_RECT ], { aInfo[ XBP_DRAWINFO_RECT, 3 ], aInfo[ XBP_DRAWINFO_RECT, 4 ]+nHeight }, xData1, nAlign ) // <<< added

oPS:setColor( nFgCol )
GraCaptionStr( oPS, aInfo[ XBP_DRAWINFO_RECT ], { aInfo[ XBP_DRAWINFO_RECT, 3 ], aInfo[ XBP_DRAWINFO_RECT, 4 ]-nHeight }, xData2, nAlign )

ELSE
...