FWxH 0905 Testsay.prg

Post Reply
User avatar
Eroni
Posts: 71
Joined: Fri Jul 21, 2006 7:15 pm
Location: Criciuma/SC Brazil
Contact:

FWxH 0905 Testsay.prg

Post by Eroni »

Good morning everyone, because someone could have known the code below does not work if you use the transparent clause?
Thank you.

Code: Select all

procedure Dlg_Bit

local oDlg
local oBrush
local oSay
local cTest := "MESA NÚMERO"
local a


   define brush oBrush file "..\bitmaps\cara.bmp"
   
   define dialog odlg title "Test Say With bitmap Brush" brush oBrush size 400,400 PIXEL
   
   for a := 1 to 5 
    cTest := "MESA NÚMERO "+ Str( a )
    @ a+2,2 say oSay prompt cTest  of oDlg SIZE 100, 130 COLOR CLR_WHITE transparent  //PIXEL  
   next a
   
   @ 10,120 button "Test" pixel action oSay:SetText( "Change Text")  

   
   ACTIVATE DIALOG oDlg CENTERED on init osay:refresh()
   
return
FWH 1709 BCC72 MySql MariaDB
Visual Studio 2019 / Xamarin / C#
User avatar
ukoenig
Posts: 3981
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany
Contact:

Re: FWxH 0905 Testsay.prg

Post by ukoenig »

Eroni,

Image

Code: Select all

FUNCTION MAIN()

local oDlg
local oBrush
local cTest := ""
local oSay, oBigfont

c_path := GETCURDIR()

// change in older FWH-versions 
// c_path := CURDRIVE() + ":\" + GETCURDIR()

oBigFont := TFont():New("Arial",0,-18,.F.,.T.,0,0,0,.F. )

// -----------------
DEFINE BRUSH oBrush FILE c_path + "\Images\Marble.bmp" 
DEFINE DIALOG oDlg TITLE "Test Say With bitmap Brush" SIZE 400,400 BRUSH oBrush PIXEL 

// OPTIONAL !
// DEFINE DIALOG oDlg TITLE "Test Say With bitmap Brush" SIZE 400,400 PIXEL 
// -----------------

I := 1
FOR I := 1 to 5
        cTest := cTest + "MESA NÚMERO  " + LTRIM(STR(I)) + CRLF // add another + CRLF for double space
NEXT I
@ 20, 20 say oSay prompt cTest  of oDlg SIZE 100, 200 COLOR 0 PIXEL UPDATE
oSay:lTransparent := .T.
oSay:oFont := oBigfont

@ 10,120 BUTTON "Test" PIXEL ACTION oSay:SetText( "Change Text")  

ACTIVATE DIALOG oDlg CENTERED 

// OPTIONAL !
// ---------------
// ACTIVATE DIALOG oDlg CENTERED ;
// ON INIT SET_BRUSH( oDlg, "Marble.Bmp" ) 

oBigfont:End()
oBrush:End()

RETURN NIL

// ---- OPTIONAL ----------

FUNCTION SET_BRUSH( oDlg, cBrush )

DEFINE BRUSH oBrush FILE c_path + "\Images\" + cBrush

oDlg:SetBrush( oBrush )
oBrush:End()

RETURN( NIL )
Best Regards
Uwe :lol:
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
Eroni
Posts: 71
Joined: Fri Jul 21, 2006 7:15 pm
Location: Criciuma/SC Brazil
Contact:

Re: FWxH 0905 Testsay.prg

Post by Eroni »

Uwe, I really appreciate your help, but in my situation does not solve my problem. What do I need to work is transparent in clause say. In the code below, if you remove the clause "transparent" then it works.
Thanks again.
Image

See:
Image

Code: Select all

procedure Dlg_Bit

local oDlg
local oSay1,oSay2,oSay3,oSay4
local cTest := ""


                 
        define dialog odlg title "Test Say transparent" size 400,400 PIXEL 
   
    cTest := "MESA NÚMERO 1"
    @ 2,2 say oSay1 prompt cTest  of oDlg SIZE 100, 130 transparent

    cTest := "MESA NÚMERO 2"
    @ 5,4 say oSay2 prompt cTest  of oDlg SIZE 100, 130 transparent 
                                                            
    cTest := "MESA NÚMERO 3"
    @ 08,6 say oSay3 prompt cTest  of oDlg SIZE 100, 130 transparent  

    cTest := "MESA NÚMERO 4"
    @ 11,8 say oSay4 prompt cTest  of oDlg SIZE 100, 130 transparent 
  
        ACTIVATE DIALOG oDlg CENTERED 
   
return 
 
FWH 1709 BCC72 MySql MariaDB
Visual Studio 2019 / Xamarin / C#
User avatar
Otto
Posts: 4470
Joined: Fri Oct 07, 2005 7:07 pm
Contact:

Re: FWxH 0905 Testsay.prg

Post by Otto »

Best regards,
Otto

Code: Select all

function Main()
    local oDlg
    local oSay1,oSay2,oSay3,oSay4
    local cTest1 := ""
    local cTest2 := ""
    local cTest3 := ""
    local cTest4 := ""


                 
        define dialog odlg title "Test Say transparent" size 400,400 PIXEL 
   
    cTest1 := "MESA NÚMERO 1"
                 @ 2,2 ;
         SAY oSay1 ;
      PROMPT cTest1 ;
          OF oDlg ;
        SIZE 100, 130 ;
 TRANSPARENT
 

    cTest2 := "MESA NÚMERO 2"
    @ 5,4 say oSay2 prompt cTest2  of oDlg SIZE 100, 130 ;
 TRANSPARENT
                                                            
    cTest3 := "MESA NÚMERO 3"
    @ 08,6 say oSay3 prompt cTest3  of oDlg SIZE 100, 130 ;
 TRANSPARENT

    cTest4 := "MESA NÚMERO 4"
    @ 11,8 say oSay4 prompt cTest4  of oDlg SIZE 100, 130 ;
 TRANSPARENT
  
        ACTIVATE DIALOG oDlg CENTERED 

return nil
Link to AutoCode:
http://www.atzwanger-software.com/fw/ACD5DEMO.Zip

Image

Image
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org

********************************************************************
User avatar
Eroni
Posts: 71
Joined: Fri Jul 21, 2006 7:15 pm
Location: Criciuma/SC Brazil
Contact:

Re: FWxH 0905 Testsay.prg

Post by Eroni »

Otto, many thanks.
FWH 1709 BCC72 MySql MariaDB
Visual Studio 2019 / Xamarin / C#
User avatar
Otto
Posts: 4470
Joined: Fri Oct 07, 2005 7:07 pm
Contact:

Re: FWxH 0905 Testsay.prg

Post by Otto »

Eroni, have you tried AutoCode. It is working with every editor.
Best regards,
Otto
Link to AutoCode:
http://www.atzwanger-software.com/fw/ACD5DEMO.Zip
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org

********************************************************************
User avatar
Eroni
Posts: 71
Joined: Fri Jul 21, 2006 7:15 pm
Location: Criciuma/SC Brazil
Contact:

Re: FWxH 0905 Testsay.prg

Post by Eroni »

Ok, Otto, I will.
FWH 1709 BCC72 MySql MariaDB
Visual Studio 2019 / Xamarin / C#
Post Reply