Para Anotnio Linares - Error en TSay

Post Reply
User avatar
pablovidal
Posts: 398
Joined: Thu Oct 06, 2005 10:15 pm
Location: Republica Dominicana
Contact:

Para Anotnio Linares - Error en TSay

Post by pablovidal »

Saludos,

En el ultimo build 6.12 esta este areglo

* Enhancement: FWH, Class TSay Method SetText() now makes a call to its Method VarPut() too. This change makes the print preview to show the right page on non XP themed applications.


Pero esto no permite que se refrescar el say cuando tiene un codeblock


Descargar Ejemplos
http://www.lotenet.com/fivewin.zip


Ejemplo:

Code: Select all

function Main()

   local oWnd, oFont
   Local cSay := Time()
   Local oSay

   DEFINE FONT oFont NAME "Arial" SIZE 40, 60

   DEFINE WINDOW oWnd FROM 1, 1 TO 20, 50 TITLE "Testing Method Say()"

   @ 3, 3 Say oSay Prompt {|| cSay } font oFont color nRGB( 25, 40, 95 ), nRGB( 192, 192, 192 ) SIZE 400, 50
   @ 1, 1 BUTTON " &Say " OF oWnd SIZE 60, 25 ACTION ( ( cSay := Time() ), oSay:Refresh(), .t. )

   ACTIVATE WINDOW oWnd

   RELEASE FONT oFont

return Nil

METHOD SetText( cText ) CLASS TSay

Code: Select all

//----------------------------------------------------------------------------//

METHOD SetText( cText ) CLASS TSay

   local hDC

   DEFAULT ::lTransparent := .f.

   ::cCaption := If( ::cPicture != nil, Transform( cText, ::cPicture ),;
                     cValToChar( cText ) )

   #ifndef __CLIPPER__
      if IsAppThemed() .or. ::lTransparent
         DrawPBack( ::hWnd, hDC := GetDC( ::hWnd ) )
         ReleaseDC( ::hWnd, hDC )
      endif
   #endif

 SetWindowText( ::hWnd, ::cCaption )
 

// AQUI ESTA EL PROBLEMA 
// ::VarPut( ::cCaption ) 

return nil
Saludos,

Pablo Alberto Vidal
/*
------------------------------------------------------
Harbour 3.2.0, Fivewin 17.02, BCC7
------------------------------------------------------
*/
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Post by Antonio Linares »

Pablo,

Prueba a cambiarlo así:

// AQUI ESTA EL PROBLEMA
::VarPut( bSetGet( ::cCaption ) )
regards, saludos

Antonio Linares
www.fivetechsoft.com
Post Reply