Page 1 of 1

btnbmp gradient

Posted: Fri Oct 07, 2022 2:22 pm
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 ?

Re: btnbmp gradient

Posted: Fri Oct 07, 2022 6:06 pm
by karinha

Re: btnbmp gradient

Posted: Sat Oct 08, 2022 10:22 am
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

Re: btnbmp gradient

Posted: Sun Oct 09, 2022 9:45 am
by nageswaragunupudi
Please try:

Code: Select all | Expand

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

Re: btnbmp gradient

Posted: Mon Oct 10, 2022 4:25 pm
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

Re: btnbmp gradient

Posted: Mon Oct 10, 2022 6:37 pm
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.

Re: btnbmp gradient

Posted: Tue Oct 11, 2022 6:15 am
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