Page 1 of 1

How to change SAY background color on transparent DIALOG

Posted: Sat Apr 03, 2021 6:13 pm
by ariston.ap
Hi all!

If a DIALG is TRANSPARENT the SAY background color inherits that of the DIALOG. Is it possible to set a different background color to REDEFINE SAY in this case?

Thanks in advance!

Re: How to change SAY background color on transparent DIALOG

Posted: Sun Apr 04, 2021 11:19 am
by ukoenig
Hello ariston.ap

DEFINE DIALOG oDlg RESOURCE "Test" OF ownd PIXEL TRANSPARENT

is used to make a global transparent for included objects
If You need a mix of transparent and NO transparent,
You have to define this for each needed object.

Image

A little test

#include "Fivewin.ch"

FUNCTION MAIN()
local oWnd, oDlg, oSay1, oSay2, oFont, oBrush1, oBrush2

DEFINE FONT oFont NAME "Arial" SIZE 0,-18 BOLD
DEFINE BRUSH oBrush1 FILE "MARBLE.bmp"
DEFINE BRUSH oBrush2 FILE "MARBLE6.bmp"

DEFINE WINDOW oWnd FROM 70, 70 TO 400, 500 PIXEL
oWnd:SetBrush( oBrush1 )

DEFINE DIALOG oDlg RESOURCE "Test" OF ownd PIXEL // TRANSPARENT
oDlg:SetBrush( oBrush2 )

REDEFINE SAY oSay1 PROMPT "Test SAY transparent" ID 100 OF oDlg FONT oFont
oSay1:Setcolor( 0, 10066431 ) // background ignored
oSay1:lTransparent := .T. // to be defined if needed :!:

REDEFINE SAY oSay2 PROMPT "Test SAY background" ID 110 OF oDlg FONT oFont
oSay2:Setcolor( 0, 10066431 )

ACTIVATE DIALOG oDlg CENTERED NOWAIT

ACTIVATE WINDOW oWnd CENTERED //;
RELEASE BRUSH oBrush1, oBrush2
oFont:End()

RETURN NIL

regards
Uwe :D

Re: How to change SAY background color on transparent DIALOG

Posted: Sun Apr 04, 2021 2:42 pm
by ariston.ap
Perfect!

It worked excactly as I expected.

Great! :)