btnbmp gradient

btnbmp gradient

Postby Silvio.Falconi » Fri Oct 07, 2022 2:22 pm

When I create a btnbmp gradient with

Code: Select all  Expand view
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 view
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
Silvio.Falconi
 
Posts: 7061
Joined: Thu Oct 18, 2012 7:17 pm

Re: btnbmp gradient

Postby karinha » Fri Oct 07, 2022 6:06 pm

João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
User avatar
karinha
 
Posts: 7824
Joined: Tue Dec 20, 2005 7:36 pm
Location: São Paulo - Brasil

Re: btnbmp gradient

Postby Silvio.Falconi » Sat Oct 08, 2022 10:22 am



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
Silvio.Falconi
 
Posts: 7061
Joined: Thu Oct 18, 2012 7:17 pm

Re: btnbmp gradient

Postby nageswaragunupudi » Sun Oct 09, 2022 9:45 am

Please try:
Code: Select all  Expand view
oBtnNum[k,t]:bClrGrad := { |lInvert| aGradH }
 
Regards

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

Re: btnbmp gradient

Postby Silvio.Falconi » Mon Oct 10, 2022 4:25 pm

nageswaragunupudi wrote:Please try:
Code: Select all  Expand view
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
Silvio.Falconi
 
Posts: 7061
Joined: Thu Oct 18, 2012 7:17 pm

Re: btnbmp gradient

Postby nageswaragunupudi » Mon Oct 10, 2022 6:37 pm

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

Re: btnbmp gradient

Postby Silvio.Falconi » Tue Oct 11, 2022 6:15 am

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
User avatar
Silvio.Falconi
 
Posts: 7061
Joined: Thu Oct 18, 2012 7:17 pm


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 84 guests