Page 1 of 1
FWxH 0905 Testsay.prg
Posted: Mon May 14, 2012 2:03 pm
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
Re: FWxH 0905 Testsay.prg
Posted: Mon May 14, 2012 3:50 pm
by ukoenig
Eroni,
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
![Laughing :lol:](./images/smilies/icon_lol.gif)
Re: FWxH 0905 Testsay.prg
Posted: Mon May 14, 2012 4:49 pm
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.
See:
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
Re: FWxH 0905 Testsay.prg
Posted: Mon May 14, 2012 5:27 pm
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](http://www.atzwanger-software.com/fw/adc10.jpg)
Re: FWxH 0905 Testsay.prg
Posted: Mon May 14, 2012 5:55 pm
by Eroni
Otto, many thanks.
Re: FWxH 0905 Testsay.prg
Posted: Mon May 14, 2012 6:01 pm
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
Re: FWxH 0905 Testsay.prg
Posted: Mon May 14, 2012 9:39 pm
by Eroni
Ok, Otto, I will.