STATIC bClrGradBtn
//--------------
Function Main()
SetDlgGradient( { { 1, RGB( 255, 255, 255 ), RGB( 229, 233, 238 ) } } )
bClrGradBtn := { | lPressed | If( ! lPressed,; //Plomo
{ { 1, RGB( 255, 255, 255 ), RGB( 229, 233, 238 ) } },;
{ { 1, RGB( 194, 197, 201 ), RGB( 240, 240, 240 ) } } ) }
//-----------------------
Function xxx()
@ .5, .5 XBROWSE oBrw SIZE 544,254 OF oDlg ;
ALIAS cAlias AUTOCOLS CELL LINES
oBrwStyle(oBrw)
oBrw:CreateFromCode()
@ nHt-15, 10 BTNBMP oBt1 PROMPT "Nuevo" SIZE 35,12 PIXEL OF oDlg RESOURCE "NEW16X16" LEFT NOBORDER ;
ACTION xAction()
@ nHt-15, 48 BTNBMP oBt2 PROMPT "&Modific " SIZE 35,12 PIXEL OF oDlg RESOURCE "EDIT16X16" LEFT NOBORDER ;
ACTION yAction()
@ nHt-15,162 BTNBMP oBt5 PROMPT "&Salir " SIZE 35,12 PIXEL OF oDlg RESOURCE "SALIR16X16" LEFT NOBORDER ;
ACTION (oDlg:End())
BtnDegrad(oDlg) //Botones degradados (BTNBMP)
ACTIVATE DIALOG oDlg CENTERED
return nil
//-----------------------------
Function oBrwStyle(oBrw)
Local aRowGrad := { { .5, nRGB( 255, 255, 255 ), nRGB( 240, 240, 240 ) }, ;
{ .5, nRGB( 240, 240, 240 ), nRGB( 232, 232, 232 ) } }
Local aSelGrad := { { .5, RGB( 255, 255, 180 ), RGB( 255, 237, 178 ) }, ;
{ .5, RGB( 255, 218, 103 ), RGB( 255, 233, 162 ) } }
WITH OBJECT oBrw
:nColDividerStyle := 5
:nMarqueeStyle := 5 //MARQSTYLE_HIGHLCELL
:nColorPen := Rgb( 225, 225, 225 )
:nRecSelColor := nRGB( 240, 240, 240 )
:bClrSel := { || { CLR_BLACK, RGB( 255, 255, 255 ) } }
:bClrSelFocus := { || { CLR_BLACK, aSelGrad } }
:bClrRowFocus := { || { CLR_BLACK, aRowGrad } }
:bClrGrad := { | lInvert | If( !lInvert, { { 0.5, nRGB( 255, 255, 255 ), nRGB( 240, 240, 240 ) }, ;
{ 0.5, nRGB( 240, 240, 240 ), nRGB( 232, 232, 232 ) } },;
{ { 0.50, 12961221, 16777215 }, { 0.50, 16777215, 12961221 } } ) }
:bClrHeader := {|| { CLR_BLUE, nRGB( 245, 245, 245 ) } }
:bClrFooter := {|| { CLR_BLUE, 16777215 } }
:lAllowRowSizing := .f.
:lAllowColSwapping := .f.
:lAllowColHiding := .f.
:lKinetic := .f.
:lColDividerComplete := .t.
:lFooter := .t.
:nHeaderHeight := 24
:nFooterHeight := :nHeaderHeight
END
Return nil
//------------------------
Function BtnDegrad(oWn)
local n
if bClrGradBtn != NIL
For n:=1 to len(oWn:aControls)
if oWn:aControls[n]:ClassName()=="TBTNBMP"
oWn:aControls[n]:bClrGrad = bClrGradBtn
endif
Next
endif
Return nil