Colorize a dialog two colors

Colorize a dialog two colors

Postby Silvio.Falconi » Tue Mar 31, 2020 11:37 am

I use a brush to colorize a dialog
DEFINE BRUSH oBrush1 COLOR COLORE_MIO
oApp:oMyDialog:SetBrush(oBrush1)

for reasons that I am not here to list now I would need to know if I can color a two-color dialog

i.e. having a light blue color for two fingers above and another color for the rest of the dialog

for example I would like to do this

Image

oApp:oMyDialog is a tPanel
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: 7068
Joined: Thu Oct 18, 2012 7:17 pm

Re: Colorize a dialog two colors

Postby Antonio Linares » Tue Mar 31, 2020 12:20 pm

Silvio,

You may use:

SetDlgGradient( { { 0.3, CLR_CYAN, CLR_CYAN }, { 0.7, CLR_YELLOW, CLR_YELLOW } } )
regards, saludos

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

Re: Colorize a dialog two colors

Postby Silvio.Falconi » Wed Apr 01, 2020 9:55 am

Antonio,
I use it for a Panel I made

oApp:oSpiaggia:bPainted:= {|hDC, cPS| ;
SetDlgGradient( { { 0.1, CLR_CYAN, CLR_CYAN }, { 0.9, COLORE_SABBIA, COLORE_SABBIA } } );
}

then on this tPanel I use btnbmp and ( on top ) the objects Ximage
the colors are bpainted but there is something not run ok because I see a white background
it is strange because btnbmps and xmage are transparent

Loook :

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: 7068
Joined: Thu Oct 18, 2012 7:17 pm

Re: Colorize a dialog two colors

Postby Silvio.Falconi » Wed Apr 01, 2020 10:12 am

I found the error
the Panel is not trasparent
then I made oApp:oSpiaggia:lTransparent :=.t.
and then I saw the problem
all btnbmp are not transparent ( look at your email)
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: 7068
Joined: Thu Oct 18, 2012 7:17 pm


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot], Otto and 68 guests

cron