How to change SAY background color on transparent DIALOG

How to change SAY background color on transparent DIALOG

Postby ariston.ap » Sat Apr 03, 2021 6:13 pm

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!
[~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~]
FWH1206 / XHB121 / BCC582 / RESOURCE WORKSHOP / XDEVSTUDIO
Please visit: arsoft-ap.com
[~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~]
User avatar
ariston.ap
 
Posts: 11
Joined: Mon Jun 29, 2015 8:16 pm
Location: Macapá - AP - Brazil

Re: How to change SAY background color on transparent DIALOG

Postby ukoenig » Sun Apr 04, 2021 11:19 am

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
Since 1995 ( the first release of FW 1.9 )
i work with FW.
If you have any questions about special functions, maybe i can help.
User avatar
ukoenig
 
Posts: 4043
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany

Re: How to change SAY background color on transparent DIALOG

Postby ariston.ap » Sun Apr 04, 2021 2:42 pm

Perfect!

It worked excactly as I expected.

Great! :)
[~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~]
FWH1206 / XHB121 / BCC582 / RESOURCE WORKSHOP / XDEVSTUDIO
Please visit: arsoft-ap.com
[~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~]
User avatar
ariston.ap
 
Posts: 11
Joined: Mon Jun 29, 2015 8:16 pm
Location: Macapá - AP - Brazil


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 82 guests