Colorize a dialog two colors

Post Reply
User avatar
Silvio.Falconi
Posts: 4956
Joined: Thu Oct 18, 2012 7:17 pm

Colorize a dialog two colors

Post by Silvio.Falconi »

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
I use : FiveWin for Harbour August 2020 (Revision) - Harbour 3.2.0dev (r1712141320) - Bcc7.30 - xMate ver. 1.15.3 - PellesC
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: Colorize a dialog two colors

Post by Antonio Linares »

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

Re: Colorize a dialog two colors

Post by Silvio.Falconi »

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
I use : FiveWin for Harbour August 2020 (Revision) - Harbour 3.2.0dev (r1712141320) - Bcc7.30 - xMate ver. 1.15.3 - PellesC
User avatar
Silvio.Falconi
Posts: 4956
Joined: Thu Oct 18, 2012 7:17 pm

Re: Colorize a dialog two colors

Post by Silvio.Falconi »

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)
I use : FiveWin for Harbour August 2020 (Revision) - Harbour 3.2.0dev (r1712141320) - Bcc7.30 - xMate ver. 1.15.3 - PellesC
Post Reply