FWH 8.07 - User defined gradient colors

Post Reply
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

FWH 8.07 - User defined gradient colors

Post by Antonio Linares »

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

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

Post by JC »

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
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Post by Antonio Linares »

iTunes colors:
Image

Code: Select all

   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: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Post by Antonio Linares »

Three gradient areas sample. You can use an unlimited number of gradient areas:
Image

Code: Select all

   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
vilian
Posts: 795
Joined: Wed Nov 09, 2005 2:17 am
Location: Brazil
Contact:

Post by vilian »

Antonio,

And buttonbmp ? when ???
Sds,
Vilian F. Arraes
vilian@vfatec.com.br
Belém-Pa-Brazil
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Post by Antonio Linares »

Vilian,

Very soon :-)
regards, saludos

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

Post by Antonio Linares »

iPhone's buttonbar colors:
Image

Code: Select all

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

Post by marca »

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
User avatar
nageswaragunupudi
Posts: 8017
Joined: Sun Nov 19, 2006 5:22 am
Location: India
Contact:

Post by nageswaragunupudi »

MsgBar uses bitmaps. Does not use color gradients.
Regards

G. N. Rao.
Hyderabad, India
marca
Posts: 104
Joined: Mon Aug 13, 2007 5:22 pm
Location: Brazil
Contact:

Post by marca »

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: 104
Joined: Mon Aug 13, 2007 5:22 pm
Location: Brazil
Contact:

Post by marca »

Ok ja resolvi o problema

Obrigado
Marcelo Ferro da Silveira
Fwh14.04/xHarbour 1.2.3 Simplex / Bcc582 / Pelles 8
SqlLib /xMate/WS
Post Reply