HELP for a test with DSAY

HELP for a test with DSAY

Postby Silvio » Sat Nov 13, 2010 9:15 pm

I must show on a control dsay the records from a archive


Code: Select all  Expand view


#include "fivewin.ch"
#include "Dsay.ch"


Function Test()
Local oWnd
Local oAnimation
lOCAL aItems

DEFINE FONT oFontanimation NAME "MS Sans Serif" SIZE 0,-36 BOLD
DEFINE WINDOW oWnd

          @ 10, 2 DYNAMIC SAY  oAnimation ;
                         FONT oFontanimation  ;
                         SIZE 700,100 PIXEL CENTERED COLOR CLR_GRAY, CLR_WHITE ;
                         VERTICAL SCROLL SPEED 50 WRAP OF oWnd


USE MESSAGGI ALIAS MESSAGGI

     MESSAGGI->(dbgotop())
     DO WHILE !Messaggi->(eof())
      //  aadd(aItems,("New message from "+STR(Messaggi->FROM)+" TO "+STR(Messaggi->TO)))
        oAnimation:SetText("New message from "+STR(Messaggi->FROM)+" TO "+STR(Messaggi->TO) )
        MESSAGGI->(dbskip())
     ENDDO



ACTIVATE WINDOW oWnd
RETURN NIL




But when I compile and execute this let me say settext error method why ?
Best Regards, Saludos

Falconi Silvio
User avatar
Silvio
 
Posts: 3107
Joined: Fri Oct 07, 2005 6:28 pm
Location: Teramo,Italy

Re: HELP for a test with DSAY

Postby StefanHaupt » Mon Nov 15, 2010 11:39 am

Silvio,

you didn´t define a variable for the text of dsay

Try this

Code: Select all  Expand view
@ 10, 2 DYNAMIC SAY  oAnimation VAR cSay;
                         FONT oFontanimation  ;
                         SIZE 700,100 PIXEL CENTERED COLOR CLR_GRAY, CLR_WHITE ;
                         VERTICAL SCROLL SPEED 50 WRAP OF oWnd
kind regards
Stefan
StefanHaupt
 
Posts: 824
Joined: Thu Oct 13, 2005 7:39 am
Location: Germany

Re: HELP for a test with DSAY

Postby Silvio » Mon Nov 15, 2010 12:50 pm

thanks I saw
but this is not the problem
I can show onlt the last record
But I want show all record or all record have the field "READ" = .F.
Best Regards, Saludos

Falconi Silvio
User avatar
Silvio
 
Posts: 3107
Joined: Fri Oct 07, 2005 6:28 pm
Location: Teramo,Italy

Re: HELP for a test with DSAY

Postby Silvio » Mon Nov 15, 2010 12:54 pm

FOUND THE SOLUTION!!!



Code: Select all  Expand view

#include "fivewin.ch"
#include "Dsay.ch"


Function Test()
Local oWnd
Local oAnimation
lOCAL aItems
Local  cSay:=""

DEFINE FONT oFontanimation NAME "MS Sans Serif" SIZE 0,-36 BOLD
DEFINE WINDOW oWnd

         @ 10, 2 DYNAMIC SAY  oAnimation VAR cSay;
                         FONT oFontanimation  ;
                         SIZE 700,100 PIXEL CENTERED COLOR CLR_GRAY, CLR_WHITE ;
                         VERTICAL SCROLL SPEED 50 WRAP OF oWnd

USE MESSAGGI ALIAS MESSAGGI

     MESSAGGI->(dbgotop())
     DO WHILE !Messaggi->(eof())
      //  aadd(aItems,("New message from "+STR(Messaggi->FROM)+" TO "+STR(Messaggi->TO)))

        csay += "New message from "+STR(Messaggi->FROM)+" TO "+STR(Messaggi->TO) +CRLF  +CRLF +CRLF

        MESSAGGI->(dbskip())

     ENDDO

       oAnimation:SetText(csay )


ACTIVATE WINDOW oWnd
RETURN NIL 
Best Regards, Saludos

Falconi Silvio
User avatar
Silvio
 
Posts: 3107
Joined: Fri Oct 07, 2005 6:28 pm
Location: Teramo,Italy


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 92 guests