Refresh Object

Post Reply
rasptty
Posts: 88
Joined: Sun May 25, 2008 5:46 pm

Refresh Object

Post by rasptty »

Function Cloca_tx(texto)
@ 2, 10 SAY alltrim(texto) size 50,15
return nil

Só funciona a 1º Vez, a segunda não limpa o texto Anterior porqué?

o mesmo se passa se for uma imagem

Obrigado
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Post by Antonio Linares »

Do it this way:

Code: Select all

Function Cloca_tx(texto) 
   static oSay

   if oSay == nil
      @ 2, 10 SAY oSay PROMPT alltrim(texto) size 50,15 
   else
      oSay:SetText( alltrim(texto) )
   endif
  
return nil 
or you will be creating a new control SAY again and again :-)
regards, saludos

Antonio Linares
www.fivetechsoft.com
rasptty
Posts: 88
Joined: Sun May 25, 2008 5:46 pm

Post by rasptty »

Ok se for texto funciona e se for uma imagem ? tipo:

DO case
case que_cla="A"
@ 16, 25 BITMAP oBmp FILENAME CURDIR() + "\img\a.bmp" Noborder OF oWnd
case que_cla="B"
@ 16, 25 BITMAP oBmp FILENAME CURDIR() + "\img\b.bmp" Noborder OF oWnd
case que_cla="C"
@ 16, 25 BITMAP oBmp FILENAME CURDIR() + "\img\c.bmp" Noborder OF oWnd
case que_cla="G"
@ 16, 25 BITMAP oBmp FILENAME CURDIR() + "\img\g.bmp" Noborder OF oWnd
Endcase
Post Reply