FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour How To Make oDlg:Say Transparent
Posts: 175
Joined: Tue Nov 10, 2009 10:56 AM
How To Make oDlg:Say Transparent
Posted: Wed Feb 01, 2012 04:35 AM

Hi

@ 9.95, 1 BUTTON "&F" OF oDlg SIZE 5, 10 ACTION (seecustd(),;
oDlg:Say( 28, 210, space(18),,, oFont, .t.),;
oDlg:Say( 28, 210, custno1,,, oFont, .t.))

How to make it transparent

Regards

ACWoo

Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Re: How To Make oDlg:Say Transparent
Posted: Wed Feb 01, 2012 09:18 AM

lTransparent is the eighth parameter not the seventh as in your sample.

EMG

Posts: 175
Joined: Tue Nov 10, 2009 10:56 AM
Re: How To Make oDlg:Say Transparent
Posted: Wed Feb 01, 2012 12:45 PM

Hi

I added the eight parameter. It is now transparent. But it does not erase the earlier entry if I click the button the second time.

@ 9.95, 1 BUTTON "&F" OF oDlg SIZE 5, 10 ACTION (seecustd(),;
oDlg:Say( 28, 210, space(18),,, oFont, .t., .t.),;
oDlg:Say( 28, 210, custno1,,, oFont, .t., .t.))

How to make it cover the earlier entry and display the latest entry so that they don't overlap.

Regards

ACWoo

Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Re: How To Make oDlg:Say Transparent
Posted: Wed Feb 01, 2012 01:29 PM

Can you build a complete sample showing the problem, please?

EMG

Posts: 175
Joined: Tue Nov 10, 2009 10:56 AM
Re: How To Make oDlg:Say Transparent
Posted: Wed Feb 01, 2012 02:35 PM

Thanks For Your Help

The sample:

function main()

include "FiveWin.ch"

local oDlg
local lSave := .f.
local oFont
local oLbx
DEFINE FONT oFont NAME "Arial" SIZE 0, -11 BOLD

if (!file("Comname1.dbf"))
tmpdbf:= {}
AAdd(tmpdbf, {"Company1", "C", 50, 0})
AAdd(tmpdbf, {"Direct1", "C", 40, 0})
dbcreate("Comname1.dbf", tmpdbf)
dbusearea(.T., Nil, "Comname1", Nil, Nil, .F.)
Append Blank
onerror("APPEND")
Replace Company1 With "ABC Co."
Replace Direct1 With ".\data"
Append Blank
onerror("APPEND")
Replace Company1 With "PQR Co."
Replace Direct1 With ".\data2"
EndIf

if (Select("Comname1") == 0)
use Comname1 new
If (neterr())
msginfo("File is locked by another user")
Close Databases
return
endif
else
select Select("Comname1")
endif
goto top

    DEFINE DIALOG oDlg FROM 0, 0 TO 26, 79 ;
      TITLE "Select Company" ;
      GRADIENT { { 1, nRGB( 199, 216, 237 ), nRGB( 237, 242, 248 ) } }

     @ -0.361, -0.1 to 13.945, 44.714
     @ -0.361, -0.1 to 12.545, 44.714
     @ -0.361, -0.1 to 10.945, 44.714


       @ 0.2, 0.4 LISTBOX oLbx FIELDS Comname1->Company1,;
                          Comname1->Direct1, "";
      HEADERS    "Company Name",  "Directory", "";
      FIELDSIZES  305,  286, 0 ;
      SIZE 307, 50 OF oDlg Font oFont;
         ON CLICK  testabc(;
                             oDlg:Say( 180, 2, space(180),,, oFont, .t., .t.),;
                             oDlg:Say( 180, 2, Company1,,, oFont, .t., .t.))

@ 9.95, 40 BUTTON oBtn6 PROMPT "&Exit" OF oDlg ACTION ( oDlg:End()) SIZE 40, 12

   ACTIVATE DIALOG oDlg CENTERED

return nil


function testabc()

return nil
******

How to modify so that when I click, they display don't overlap.

Regards

ACWoo

Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Re: How To Make oDlg:Say Transparent
Posted: Wed Feb 01, 2012 02:39 PM

Sorry, I need a sample that can be compiled and run here.

EMG

Posts: 175
Joined: Tue Nov 10, 2009 10:56 AM
Re: How To Make oDlg:Say Transparent
Posted: Wed Feb 01, 2012 11:14 PM

Thanks For Your Help

I could compile and run here with fwh1111 or later + harbour + bcc582. It is transparent. Just the display overlap.

Regards

ACWoo

Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Re: How To Make oDlg:Say Transparent
Posted: Wed Feb 01, 2012 11:36 PM

Please use a SAY control instead of the Say() method. You can then use the SetText() method to change the caption of the SAY control. Or try oDlg:Refresh() before the Say() method.

EMG

Posts: 175
Joined: Tue Nov 10, 2009 10:56 AM
Re: How To Make oDlg:Say Transparent
Posted: Thu Feb 02, 2012 02:26 AM

Thanks For Your Help

oDlg:Say( x1, y1,...
and
@ x2, y2 say oSay..

is there a simple conversion factor for x1, y1 and x2, y2 ?

Thanks

Regards

ACWoo

Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Re: How To Make oDlg:Say Transparent
Posted: Thu Feb 02, 2012 09:14 AM

Please use the PIXEL clause of @ SAY command.

EMG

Continue the discussion