FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Colorize a dialog two colors
Posts: 7317
Joined: Thu Oct 18, 2012 07:17 PM
Colorize a dialog two colors
Posted: 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



oApp:oMyDialog is a tPanel
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)

I use : FiveWin for Harbour March-April 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
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Colorize a dialog two colors
Posted: 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
Posts: 7317
Joined: Thu Oct 18, 2012 07:17 PM
Re: Colorize a dialog two colors
Posted: Wed Apr 01, 2020 09:55 AM
Antonio,
I use it for a Panel I made

oApp:oSpiaggia:= {|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 :

Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)

I use : FiveWin for Harbour March-April 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
Posts: 7317
Joined: Thu Oct 18, 2012 07:17 PM
Re: Colorize a dialog two colors
Posted: 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 March-April 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

Continue the discussion