SAY with background-color

SAY with background-color

Postby byte-one » Mon Sep 23, 2013 3:18 pm

I will use SAY with background-color but in a dialog not transparent with clausula GRADIENT is not functioning. Any suggestion please!
Regards,
Günther
---------------------------------
office@byte-one.com
User avatar
byte-one
 
Posts: 1048
Joined: Mon Oct 24, 2005 9:54 am
Location: Austria

Re: SAY with background-color

Postby Antonio Linares » Mon Sep 23, 2013 6:19 pm

Günther,

When you use a GRADIENT or if you are using the function SetDlgGradient(), the dialog assumes that you want it to be transparent.

This way, you can tell the dialog not to be transparent even if there is a gradient:

Code: Select all  Expand view
#include "FiveWin.ch"

function Main()

   local oDlg

   SetDlgGradient( { { 1, RGB( 199, 216, 237 ), RGB( 237, 242, 248 ) } } )
   
   DEFINE DIALOG oDlg

   oDlg:lTransparent = .F.

   @ 1, 2 SAY "Hello" COLOR "R+/B"

   ACTIVATE DIALOG oDlg CENTERED

return nil
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42094
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: SAY with background-color

Postby byte-one » Tue Sep 24, 2013 8:10 am

Antonio, thanks!
Now i have the Problem, all other says are also not transparent. The says with ID i can make transparent with the clausula TRANSPARENT but what is with the static says (only declared in the RC-file).
Regards,
Günther
---------------------------------
office@byte-one.com
User avatar
byte-one
 
Posts: 1048
Joined: Mon Oct 24, 2005 9:54 am
Location: Austria

Re: SAY with background-color

Postby Antonio Linares » Tue Sep 24, 2013 1:51 pm

Günther,

Do it this way:

Code: Select all  Expand view
#include "FiveWin.ch"

function Main()

   local oDlg

   SetDlgGradient( { { 1, RGB( 199, 216, 237 ), RGB( 237, 242, 248 ) } } )
   
   DEFINE DIALOG oDlg

   @ 1, 3 SAY "with gradient"

   ACTIVATE DIALOG oDlg CENTERED ;
     ON INIT BuildMyDifferentSay( oDlg )

return nil

function BuildMyDifferentSay( oDlg )

   @ 5, 4 SAY "without gradient" COLOR "R+/B"

return nil


Image
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42094
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 86 guests