Page 1 of 1

Colorize a dialog two colors

Posted: Tue Mar 31, 2020 11:37 am
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

Re: Colorize a dialog two colors

Posted: Tue Mar 31, 2020 12:20 pm
by Antonio Linares
Silvio,

You may use:

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

Re: Colorize a dialog two colors

Posted: Wed Apr 01, 2020 9:55 am
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

Re: Colorize a dialog two colors

Posted: Wed Apr 01, 2020 10:12 am
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)