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
:bClrHeader := {|| { CLR_BLUE, nRGB( 245, 245, 245 ) } }
:bClrFooter := {|| { CLR_BLUE, 16777215 } }
oLbx:l2007 := .F. // light grey
oLbx:bClrGrad := { | lInvert | If( ! lInvert, ;
{ { 0.50, 15790320, 15790320 }, ;
{ 0.50, 15790320, 15790320 } }, ;
{ { 0.50, 15790320, 15790320 }, ;
{ 0.50, 15790320, 15790320 } } ) }
Rick Lipkin wrote:Francisco
Thank you for your suggestion .. going to try your solution :
- Code: Select all Expand view
:bClrHeader := {|| { CLR_BLUE, nRGB( 245, 245, 245 ) } }
:bClrFooter := {|| { CLR_BLUE, 16777215 } }
Rick Lipkin
is there a way to just make the color a solid light grey without any gradient ?
//------------------------
Function FapBrwSetup(oBrw)
local nFONDO1 := RGB(215, 215, 215)
local nFONDO2 := RGB(235, 235, 235)
local nAZUL := RGB( 0, 0, 128)
WITH OBJECT oBrw
:l2007 := .f.
:nRecSelColor := nFONDO1
:nStyle := nAnd( :nStyle, nNot( WS_BORDER ) )
:nMarqueeStyle := MARQSTYLE_HIGHLROW //ilumina toda la linea
:bClrHeader := {|| { nAZUL, nFONDO1, } }
:bClrFooter := :bClrHeader // Colores texto de footers
:bClrStd := {|| IF( oBrw:nArrayAt() % 2 == 0, {nAZUL, nFONDO1}, {nAZUL, nFONDO2} ) }
:bClrSel := {|| { nAZUL, CLR_WHITE } } // para barra de linea selecc cuando el control no tiene el foco
:bClrSelFocus := { || { CLR_WHITE, nAZUL } } // para barra de linea selecc cuando el control tiene el foco
:nColDividerStyle := LINESTYLE_LIGHTGRAY
:nRowDividerStyle := LINESTYLE_LIGHTGRAY
END
Return nil
WITH OBJECT oBrw
:bClrHeader := { || { 255, } } // red text and keeps the background
// same for footer
:bClrFooter := { || { 255, } } // red text and keeps the background
END
Return to FiveWin for Harbour/xHarbour
Users browsing this forum: No registered users and 106 guests