FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour FWH 8.07 - User defined gradient colors
Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM
FWH 8.07 - User defined gradient colors
Posted: Fri Jul 25, 2008 12:08 PM
Gradient colors for Bars, Buttons and XBrowses can be easily defined, and accept an unlimited number of gradient "areas" (not just two). New DATA bClrGrad:

   DEFINE BUTTONBAR oBar OF oWnd SIZE 60, 60 2007

   oBar:bClrGrad = { | lInvert | If( ! lInvert,;
                                     { { 0.25, nRGB( 129, 132, 135 ), nRGB( 54, 58, 62 ) },;
                                       { 0.75, nRGB(  20,  40,  60 ), nRGB(  5, 10, 15 ) } },;
                                     { { 0.25, nRGB( 160, 173, 174 ), nRGB( 67, 112, 133 ) },;
                                       { 0.75, nRGB(  11,  66,  94 ), nRGB( 74, 134, 187 ) } } ) }
   oBar:nClrText = { | lInvert | If( ! lInvert, nRGB( 235, 160, 86 ), nRGB( 20, 20, 20 ) ) }

You can use many different colors, as the result of evaluating those codeblocks!
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 445
Joined: Thu Feb 21, 2008 11:58 AM
FWH 8.07 - User defined gradient colors
Posted: Fri Jul 25, 2008 12:19 PM

Very nice!

Peace and lighting!

Júlio César M. Ferreira

FWH 8.10 / xHB 1.1.0 / xDevStudio 0.72 / Pelles C 5.0.1 / SQLLIB 1.9
Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM
FWH 8.07 - User defined gradient colors
Posted: Fri Jul 25, 2008 12:33 PM
iTunes colors:

   oBar:bClrGrad = { | lInvert | If( ! lInvert,;
                                     { { 1, nRGB( 195, 196, 194 ), nRGB( 151, 149, 150 ) } },;
                                     { { 1, nRGB( 254, 255, 232 ), nRGB( 214, 219, 191 ) } } ) }
   oBar:nClrText = { | lInvert | If( ! lInvert, nRGB( 235, 160, 86 ), nRGB( 20, 20, 20 ) ) }
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM
FWH 8.07 - User defined gradient colors
Posted: Fri Jul 25, 2008 12:49 PM
Three gradient areas sample. You can use an unlimited number of gradient areas:

   oBar:bClrGrad = { | lInvert | If( ! lInvert,;
                                     { { 0.30, nRGB( 0, 228, 1 ), nRGB( 168, 231, 38 ) },;
                                       { 0.30, nRGB( 168, 231, 38 ), nRGB( 233, 175, 5 ) },;
                                       { 0.30, nRGB( 233, 175, 5 ), nRGB( 236, 8, 9 ) } },;
                                     { { 1, nRGB( 254, 255, 232 ), nRGB( 214, 219, 191 ) } } ) }
   oBar:nClrText = nRGB( 255, 0, 255 )
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 1067
Joined: Wed Nov 09, 2005 02:17 AM
FWH 8.07 - User defined gradient colors
Posted: Fri Jul 25, 2008 01:14 PM

Antonio,

And buttonbmp ? when ???

Sds,
Vilian F. Arraes
vilian@vfatec.com.br
Belém-Pa-Brazil
Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM
FWH 8.07 - User defined gradient colors
Posted: Fri Jul 25, 2008 01:45 PM

Vilian,

Very soon :-)

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM
FWH 8.07 - User defined gradient colors
Posted: Fri Jul 25, 2008 06:03 PM
iPhone's buttonbar colors:

   oBar:bClrGrad = { | lInvert | If( ! lInvert,;
                                     { { 0.50, nRGB( 178, 187, 202 ), nRGB( 137, 155, 179 ) },;
                                       { 0.50, nRGB( 129, 149, 174 ), nRGB( 114, 132, 156 ) } },;
                                     { { 0.50, nRGB( 139, 166, 193 ), nRGB(  69, 119, 170 ) },;
                                       { 0.50, nRGB(  52, 104, 152 ), nRGB(  50, 107, 162 ) } } ) }
   oBar:nClrText = nRGB( 255, 255, 255 )
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 117
Joined: Mon Aug 13, 2007 05:22 PM
FWH 8.07 - User defined gradient colors
Posted: Fri Aug 29, 2008 11:46 PM

Ola Antonio

e como fica a msgbar ?
pos

oWnd:oMsgBar:bClrGrad = { | lInvert | If( ! lInvert,;
{ { 0.50, nRGB( 178, 187, 202 ), nRGB( 137, 155, 179 ) } ,;
{ 0.50, nRGB( 129, 149, 174 ), nRGB( 114, 132, 156 ) } },;
{ { 0.50, nRGB( 139, 166, 193 ), nRGB( 69, 119, 170 ) },;
{ 0.50, nRGB( 52, 104, 152 ), nRGB( 50, 107, 162 ) } } ) }
oWnd:oMsgBar:nClrText = { | lInvert | If( ! lInvert, nRGB( 000, 000, 000 ),nRGB( 155, 155, 155 ) )}

nao funcionou

um abraço

Marcelo Ferro da Silveira

Fwh14.04/xHarbour 1.2.3 Simplex / Bcc582 / Pelles 8

SqlLib /xMate/WS
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
FWH 8.07 - User defined gradient colors
Posted: Fri Aug 29, 2008 11:59 PM

MsgBar uses bitmaps. Does not use color gradients.

Regards



G. N. Rao.

Hyderabad, India
Posts: 117
Joined: Mon Aug 13, 2007 05:22 PM
FWH 8.07 - User defined gradient colors
Posted: Sat Aug 30, 2008 12:58 PM

Poderia dar um exemplo de como fazer com o bitmap ?

obrigado

Marcelo Ferro da Silveira

Fwh14.04/xHarbour 1.2.3 Simplex / Bcc582 / Pelles 8

SqlLib /xMate/WS
Posts: 117
Joined: Mon Aug 13, 2007 05:22 PM
FWH 8.07 - User defined gradient colors
Posted: Sat Aug 30, 2008 02:51 PM

Ok ja resolvi o problema

Obrigado

Marcelo Ferro da Silveira

Fwh14.04/xHarbour 1.2.3 Simplex / Bcc582 / Pelles 8

SqlLib /xMate/WS

Continue the discussion