@ SAY

@ SAY

Postby rhlawek » Tue Jun 10, 2014 9: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
User avatar
rhlawek
 
Posts: 194
Joined: Sun Jul 22, 2012 7:01 pm

Re: @ SAY

Postby Antonio Linares » Wed Jun 11, 2014 7: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
User avatar
Antonio Linares
Site Admin
 
Posts: 42099
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: @ SAY

Postby rhlawek » Wed Jun 11, 2014 9: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
User avatar
rhlawek
 
Posts: 194
Joined: Sun Jul 22, 2012 7:01 pm

Re: @ SAY

Postby James Bott » Wed Jun 11, 2014 1: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
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Re: @ SAY

Postby James Bott » Wed Jun 11, 2014 2: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
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Re: @ SAY

Postby Antonio Linares » Wed Jun 11, 2014 4:57 pm

Robb,

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

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, 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
User avatar
Antonio Linares
Site Admin
 
Posts: 42099
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 55 guests