FWH 8.07 - User defined gradient colors

FWH 8.07 - User defined gradient colors

Postby Antonio Linares » 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:
Image
Code: Select all  Expand view
   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!
Last edited by Antonio Linares on Fri Jul 25, 2008 12:20 pm, edited 1 time in total.
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 41312
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby JC » 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
User avatar
JC
 
Posts: 445
Joined: Thu Feb 21, 2008 11:58 am
Location: Brazil

Postby Antonio Linares » Fri Jul 25, 2008 12:33 pm

iTunes colors:
Image
Code: Select all  Expand view
   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
User avatar
Antonio Linares
Site Admin
 
Posts: 41312
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby Antonio Linares » Fri Jul 25, 2008 12:49 pm

Three gradient areas sample. You can use an unlimited number of gradient areas:
Image
Code: Select all  Expand view
   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
User avatar
Antonio Linares
Site Admin
 
Posts: 41312
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby vilian » Fri Jul 25, 2008 1:14 pm

Antonio,

And buttonbmp ? when ???
Sds,
Vilian F. Arraes
vilian@vfatec.com.br
Belém-Pa-Brazil
User avatar
vilian
 
Posts: 920
Joined: Wed Nov 09, 2005 2:17 am
Location: Brazil

Postby Antonio Linares » Fri Jul 25, 2008 1:45 pm

Vilian,

Very soon :-)
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 41312
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby Antonio Linares » Fri Jul 25, 2008 6:03 pm

iPhone's buttonbar colors:
Image
Code: Select all  Expand view
   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
User avatar
Antonio Linares
Site Admin
 
Posts: 41312
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby marca » 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
marca
 
Posts: 116
Joined: Mon Aug 13, 2007 5:22 pm
Location: Brazil

Postby nageswaragunupudi » Fri Aug 29, 2008 11:59 pm

MsgBar uses bitmaps. Does not use color gradients.
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10245
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Postby marca » 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
marca
 
Posts: 116
Joined: Mon Aug 13, 2007 5:22 pm
Location: Brazil

Postby marca » Sat Aug 30, 2008 2: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
marca
 
Posts: 116
Joined: Mon Aug 13, 2007 5:22 pm
Location: Brazil


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 16 guests