Estoy usando la función que nos pasaste para que la barra se vea como Windows 7
Funciona bien, lo que quiero es que la primera columna sea de otro color.
Hago lo siguiente:
Function Muestra(aTexto)
DEFINE FONT oBig NAME "Courier New" SIZE 0,-13
DEFINE FONT oFont NAME "Courier New" SIZE 0,-11
DEFINE FONT oFont1 NAME "Arial" SIZE 4, -9.8
DEFINE DIALOG oDlgView FROM nDWTop, nDWLeft TO nDWBottom, nDWRight PIXEL TITLE "Muestra archivo "
oBrw1:= TXBrowse():New( oDlgView )
WITH OBJECT oBrw1
:nMarqueeStyle := MARQSTYLE_HIGHLROW
:lRecordSelector:=.F.
:nFreeze:=1
:nColSel:=2
:nHeaderHeight:=8
:lTransparent=.T.
:SetArray( aTexto,.T. )
END
oBrw1:aCols[1]:cHeader:=.F.
oBrw1:aCols[1]:nWidth:=25
oBrw1:aCols[1]:oDataFont:=oFont1
oBrw1:aCols[1]:cOrder:="D"
oBrw1:aCols[1]:nDataStrAlign:=AL_RIGHT
oBrw1:aCols[1]:bClrStd:={|| {CLR_GRAY,nRGB(230,230,240)} }
oBrw1:aCols[2]:cHeader := .F.
oBrw1:aCols[2]:oDataFont:= { || iif( lFont,oFont,oBig) }
AEval( oBrw1:aCols, { | oCol | oCol:bPaintText := { | oCol, hDC, cData, aRect | PaintCol( oCol, hDC, cData, aRect ) } } )
oBrw1:CreateFromCode()
ACTIVATE DIALOG oDlgView
Return Nil
...
#pragma BEGINDUMP
#include <windows.h>
#include <hbapi.h>
HB_FUNC( ROUNDBOX )
{
HDC hDC = ( HDC ) hb_parni( 1 );
HBRUSH hBrush = ( HBRUSH ) GetStockObject( 5 );
HBRUSH hOldBrush = ( HBRUSH ) SelectObject( hDC, hBrush );
HPEN hPen, hOldPen ;
if( hb_pcount() > 8 )
hPen = CreatePen( PS_SOLID, hb_parnl( 9 ), ( COLORREF ) hb_parnl( 8 ) );
else
hPen = CreatePen( PS_SOLID, 1, ( COLORREF ) hb_parnl( 8 ) );
hOldPen = ( HPEN ) SelectObject( hDC, hPen );
hb_retl( RoundRect( hDC ,
hb_parni( 2 ),
hb_parni( 3 ),
hb_parni( 4 ),
hb_parni( 5 ),
hb_parni( 6 ),
hb_parni( 7 ) ) );
SelectObject( hDC, hOldBrush );
DeleteObject( hBrush );
SelectObject( hDC, hOldPen );
DeleteObject( hPen );
}
#pragma ENDDUMP
*
function PaintCol( oCol, hDC, cData, aRect )
if oCol:oBrw:VGetPos() == oBrw1:nArrayAt //Cust->( OrdKeyNo() )
GradientFill( hDC, aRect[ 1 ] - 2, aRect[ 2 ] - 3, aRect[ 3 ] + 1, aRect[ 4 ] + 5,;
{ { 1, RGB( 220, 235, 252 ), RGB( 193, 219, 252 ) } }, .T. )
SetBkMode( hDC, 1 )
RoundBox( hDC, 2, aRect[ 1 ] - 1, WndWidth( oCol:oBrw:hWnd ) - 22, aRect[ 3 ] + 1, 2, 2,;
RGB( 235, 244, 253 ), 1 )
RoundBox( hDC, 1, aRect[ 1 ] - 2, WndWidth( oCol:oBrw:hWnd ) - 21, aRect[ 3 ] + 2, 2, 2,;
RGB( 125, 162, 206 ), 1 )
endif
SetTextColor( hDC, 0 )
DrawTextEx( hDC, cData, aRect, oCol:nDataStyle )
return nilEl resultado es:

Gracias por ayuda
Saludos
Adhemar
Saludos,
Adhemar Cuéllar



