Page 1 of 1

Can Colorized this border ?

Posted: Thu Dec 02, 2021 7:33 am
by Silvio.Falconi
could i program the color of this border?

Image

Re: Can Colorized this border ?

Posted: Thu Dec 02, 2021 12:27 pm
by karinha
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.

Re: Can Colorized this border ?

Posted: Thu Dec 02, 2021 12:32 pm
by Silvio.Falconi
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.


You said right they are not fortune tellers but programmers
Dijiste bien que no son adivinos sino programadores

this is a simple buttonbar
esta es una barra de botones simple

which code should i display?
¿Qué código debo mostrar?



Code: Select all | Expand

DEFINE BUTTONBAR oBarCat OF oDlg SIZE 80, 60  2015   BOTTOM BORDER

Re: Can Colorized this border ?

Posted: Thu Dec 02, 2021 3:05 pm
by karinha
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


// \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.

Re: Can Colorized this border ?

Posted: Thu Dec 02, 2021 3:59 pm
by Silvio.Falconi
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


// \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.




dear sir i didn't ask to move an example to color the buttonbar. my request was quite different.
Once again I ask you to be punctual on the answers (if you want to help) and not to answer with other arguments or other things that I have never asked you.
I only asked if it was possible to color the border of the buttonbar, I didn't ask what you answered

Re: Can Colorized this border ?

Posted: Thu Dec 02, 2021 7:03 pm
by karinha
ok. sirve para otro usuário.

Re: Can Colorized this border ?

Posted: Sat Dec 04, 2021 10:34 am
by ukoenig
Silvio,

my solution is tested on all 4 positions

possible to define : pensize, color and the pen transparentlevel

Image

Image

regards
Uwe :D

Re: Can Colorized this border ?

Posted: Sat Dec 04, 2021 12:17 pm
by Silvio.Falconi
I resolved thanks