FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour @ SAY
Posts: 195
Joined: Sun Jul 22, 2012 07:01 PM
@ SAY
Posted: Tue Jun 10, 2014 09:32 PM

I have an issue with @ SAY that I don't quite understand. Using it is not too difficult, and I get it to update and show on the screen without issue, which is controlled by navigation through and xbrowse. The problem I have is that each time the text is changed and the screen gets refreshed, text previously displayed is just overlayed with the updated text. How do I clear previously written text so it doesn't just overlay but instead clears the defined region the only displays the updated text?

Robb

Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: @ SAY
Posted: Wed Jun 11, 2014 07:52 AM

Robb,

oSay:SetText( "new text" )

The Method SetText() is implemented in Class TWindow so it can be used on dialogs and most controls :-)

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 195
Joined: Sun Jul 22, 2012 07:01 PM
Re: @ SAY
Posted: Wed Jun 11, 2014 09:56 AM

Antonio,

I sent you an email with a small screen shot of what I see. I am using SayText() to update the text, it is the clearing of previously written text that is eluding me.

Robb

Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM
Re: @ SAY
Posted: Wed Jun 11, 2014 01:49 PM

If I remember correctly, the new text has to be longer than the old text--if needed add spaces.

James

FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM
Re: @ SAY
Posted: Wed Jun 11, 2014 02:00 PM

I just remembered that I usually use something like:

padr(cNewText,30)

Substitute 30 with whatever your maximum length is.

FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: @ SAY
Posted: Wed Jun 11, 2014 04:57 PM
Robb,

This example seems to work fine here: (right click on the dialog to change the text)

Code (fw): Select all Collapse
#include "FiveWin.ch"

function Main()

   local oDlg

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

   DEFINE DIALOG oDlg

   @ 1, 1 SAY oSay PROMPT "Hello" OF oDlg

   ACTIVATE DIALOG oDlg CENTERED ;
      ON CLICK oSay:SetText( "bye" )

return nil
regards, saludos

Antonio Linares
www.fivetechsoft.com

Continue the discussion