could i program the color of this border?
karinha wrote:Show how you made this edge. on this forum, there are programmers, not soothsayers.
Muestre cómo hizo este borde. en este foro, hay programadores, no adivinos.
Te he pedido varias veces que siempre publiques el código.
I have asked you several times to always post the code.
DEFINE BUTTONBAR oBarCat OF oDlg SIZE 80, 60 2015 BOTTOM BORDER
// \SAMPLES\COLORBAR.PRG - kapiabafwh@gmail.com
#Include "FiveWin.ch"
#Define CLR_LGREEN nRGB( 190, 215, 190 )
#Define aPubGrad {| lInvert | If( lInvert, ;
{ { 1 / 3, nRGB( 255, 253, 222 ), nRGB( 255, 231, 151 ) }, ;
{ 2 / 3, nRGB( 255, 215, 84 ), nRGB( 255, 233, 162 ) } ;
}, ;
{ { 1 / 2, nRGB( 219, 230, 244 ), nRGB( 207 - 50, 221 - 25, 255 ) }, ;
{ 1 / 2, nRGB( 201 - 50, 217 - 25, 255 ), nRGB( 231, 242, 255 ) } ;
} ) }
STATIC oWnd
STATIC oDlg
FUNCTION Main()
LOCAL oBar, cTitle, nRet
cTitle := "Color in ButtonBar in Dialog"
SkinButtons()
DEFINE WINDOW oWnd TITLE cTitle
DEFINE BUTTONBAR oBar _3D OF oWnd
DEFINE BUTTON OF oBar ACTION( ColorBar1() )
SET MESSAGE OF oWnd TO cTitle NOINSET CLOCK DATE KEYBOARD
ACTIVATE WINDOW oWnd MAXIMIZED
RETURN NIL
FUNCTION ColorBar1()
LOCAL oFont, oBold, oBar, cTitle, oImp, oExit
cTitle := "Color in ButtonBar"
DEFINE FONT oFont NAME 'Tahoma' SIZE 0, -16 BOLD
DEFINE FONT oBold NAME 'Tahoma' SIZE 0, -14 BOLD
DEFINE DIALOG oDlg SIZE 400, 400 PIXEL TRUEPIXEL ;
TITLE cTitle
oDlg:lHelpIcon := .F.
DEFINE BUTTONBAR oBar _3D OF oDlg SIZE 64, 70 2007
WITH OBJECT oBar
oBar:bClrGrad := aPubGrad
oBar:bRClicked := { || NIL }
oBar:bLClicked := { || NIL }
oBar:SetFont( oFont )
oBar:nClrText := CLR_CYAN
oBar:Adjust()
END
DEFINE BUTTON oImp OF oBar PROMPT "Print" ;
FILENAME "..\bitmaps\16x16\printer.bmp" FLAT ;
ACTION( Imprimir() )
oImp:cToolTip := "Impresion"
DEFINE BUTTON oExit OF oBar PROMPT "Exit" ;
FILENAME "..\bitmaps\16x16\Exit.bmp" FLAT ;
ACTION( oDlg:End() )
oExit:cToolTip := "Exit"
ACTIVATE DIALOG oDlg CENTERED
oFont:End()
oBold:End()
RETURN NIL
FUNCTION Imprimir()
? [Impresion]
RETURN NIL
// FIN / END
karinha wrote:Cuando alguien pide un ejemplo, debería publicarse, más o menos como si lo estuviera publicando ahora. Si el ejemplo no funciona para usted, funcionará para otro usuario del foro. Vea si este código le ayuda.
When someone asks for an example, it should get posted, more or less like I'm posting it now. If the example doesn't work for you, it will work for another forum user. See if this code helps you.
- Code: Select all Expand view
// \SAMPLES\COLORBAR.PRG - kapiabafwh@gmail.com
#Include "FiveWin.ch"
#Define CLR_LGREEN nRGB( 190, 215, 190 )
#Define aPubGrad {| lInvert | If( lInvert, ;
{ { 1 / 3, nRGB( 255, 253, 222 ), nRGB( 255, 231, 151 ) }, ;
{ 2 / 3, nRGB( 255, 215, 84 ), nRGB( 255, 233, 162 ) } ;
}, ;
{ { 1 / 2, nRGB( 219, 230, 244 ), nRGB( 207 - 50, 221 - 25, 255 ) }, ;
{ 1 / 2, nRGB( 201 - 50, 217 - 25, 255 ), nRGB( 231, 242, 255 ) } ;
} ) }
STATIC oWnd
STATIC oDlg
FUNCTION Main()
LOCAL oBar, cTitle, nRet
cTitle := "Color in ButtonBar in Dialog"
SkinButtons()
DEFINE WINDOW oWnd TITLE cTitle
DEFINE BUTTONBAR oBar _3D OF oWnd
DEFINE BUTTON OF oBar ACTION( ColorBar1() )
SET MESSAGE OF oWnd TO cTitle NOINSET CLOCK DATE KEYBOARD
ACTIVATE WINDOW oWnd MAXIMIZED
RETURN NIL
FUNCTION ColorBar1()
LOCAL oFont, oBold, oBar, cTitle, oImp, oExit
cTitle := "Color in ButtonBar"
DEFINE FONT oFont NAME 'Tahoma' SIZE 0, -16 BOLD
DEFINE FONT oBold NAME 'Tahoma' SIZE 0, -14 BOLD
DEFINE DIALOG oDlg SIZE 400, 400 PIXEL TRUEPIXEL ;
TITLE cTitle
oDlg:lHelpIcon := .F.
DEFINE BUTTONBAR oBar _3D OF oDlg SIZE 64, 70 2007
WITH OBJECT oBar
oBar:bClrGrad := aPubGrad
oBar:bRClicked := { || NIL }
oBar:bLClicked := { || NIL }
oBar:SetFont( oFont )
oBar:nClrText := CLR_CYAN
oBar:Adjust()
END
DEFINE BUTTON oImp OF oBar PROMPT "Print" ;
FILENAME "..\bitmaps\16x16\printer.bmp" FLAT ;
ACTION( Imprimir() )
oImp:cToolTip := "Impresion"
DEFINE BUTTON oExit OF oBar PROMPT "Exit" ;
FILENAME "..\bitmaps\16x16\Exit.bmp" FLAT ;
ACTION( oDlg:End() )
oExit:cToolTip := "Exit"
ACTIVATE DIALOG oDlg CENTERED
oFont:End()
oBold:End()
RETURN NIL
FUNCTION Imprimir()
? [Impresion]
RETURN NIL
// FIN / END
Regards, saludos.
Return to FiveWin for Harbour/xHarbour
Users browsing this forum: Google [Bot] and 56 guests