btnbmp gradient

Post Reply
User avatar
Silvio.Falconi
Posts: 7136
Joined: Thu Oct 18, 2012 7:17 pm
Been thanked: 1 time

btnbmp gradient

Post by Silvio.Falconi »

When I create a btnbmp gradient with

Code: Select all | Expand

oBtnNum[k,t]:bClrGrad := { | lInvert | If( lInvert, ;
                               { { 1/3, aBack[k], aGradient[k] }, ;
                                 { 2/3, aGradient[k], aBack[k] }  ;
                               }, ;
                               { { 1/2, aGradient[k], aBack[k] }, ;
                                 { 1/2, aBack[k], aGradient[k] }  ;
                                } ) }


I have a btnbmp as this

Image

practically I have a horizontal gradient how do I get a vertical gradient? ie like this

Image


I tried also with

Code: Select all | Expand

oBtnNum[k,t]:bClrGrad  := { | lPressed | If( ! lPressed,;
            { { 1, aBack[k], aGradient[k] } },;
            { { 1, aGradient[k], aBack[k] } } ) }
 


result

Image

which is the worst situation but it is not what I was looking for




any solution pls ?
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
User avatar
karinha
Posts: 7935
Joined: Tue Dec 20, 2005 7:36 pm
Location: São Paulo - Brasil
Been thanked: 3 times
Contact:

Re: btnbmp gradient

Post by karinha »

João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
User avatar
Silvio.Falconi
Posts: 7136
Joined: Thu Oct 18, 2012 7:17 pm
Been thanked: 1 time

Re: btnbmp gradient

Post by Silvio.Falconi »



I tried and it crash out with btnbmp

local aGradH := ;
{ { 0.20, aBack[k], aGradient[k] } ;
, { 0.30, aGradient[k], atext[k] } ;
, { 0.30, atext[k], aGradient[k] } ;
, { 0.20, aGradient[k], aBack[k] } ;
, .F. ;
}
oBtnNum[k,t]:bClrGrad := aGradH
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
User avatar
nageswaragunupudi
Posts: 10721
Joined: Sun Nov 19, 2006 5:22 am
Location: India
Been thanked: 8 times
Contact:

Re: btnbmp gradient

Post by nageswaragunupudi »

Please try:

Code: Select all | Expand

oBtnNum[k,t]:bClrGrad := { |lInvert| aGradH }
 
Regards

G. N. Rao.
Hyderabad, India
User avatar
Silvio.Falconi
Posts: 7136
Joined: Thu Oct 18, 2012 7:17 pm
Been thanked: 1 time

Re: btnbmp gradient

Post by Silvio.Falconi »

nageswaragunupudi wrote:Please try:

Code: Select all | Expand

oBtnNum[k,t]:bClrGrad := { |lInvert| aGradH }
 


Nages,
with
local aGradH := ;
{ { 0.20, aBack[k], aGradient[k] } ;
, { 0.30, aGradient[k], atext[k] } ;
, { 0.30, atext[k], aGradient[k] } ;
, { 0.20, aGradient[k], aBack[k] } ;
, .f. ;
}

I have this
Image

with

local aGradH := ;
{ { 0.20, aBack[k], aGradient[k] } ;
, { 0.30, aGradient[k], atext[k] } ;
, { 0.30, atext[k], aGradient[k] } ;
, { 0.20, aGradient[k], aBack[k] } ;
, .t. ;
}

I have this

Image

I wish on Horizontal n1 more clear n.10 more back
as this : i look it on another software not mine

Image
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
User avatar
nageswaragunupudi
Posts: 10721
Joined: Sun Nov 19, 2006 5:22 am
Location: India
Been thanked: 8 times
Contact:

Re: btnbmp gradient

Post by nageswaragunupudi »

I explained how to make horizontal gradient. We can make angular gradients too and also use alpha colors.
In all cases, final appearance depends on choice of colors and percent values.
Regards

G. N. Rao.
Hyderabad, India
User avatar
Silvio.Falconi
Posts: 7136
Joined: Thu Oct 18, 2012 7:17 pm
Been thanked: 1 time

Re: btnbmp gradient

Post by Silvio.Falconi »

nageswaragunupudi wrote:I explained how to make horizontal gradient. We can make angular gradients too and also use alpha colors.
In all cases, final appearance depends on choice of colors and percent values.


I not think it is angular gradient
the number 1 much lighter and the number 10 much darker, I have these three colors
Back color
Gradient color
Text color
I thought that I could make a gradient to the btnbmp with the "back color" and the "gradient color" and put the "text color" to write the text

the gradient starts from the buttons on the left which are light to the last one on the right which are dark
Instead, until now I have a horizontal and vertical gradien in the middle in the button instead the vertical should always start vertically from left to right
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
Post Reply