FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin para Harbour/xHarbour Para Anotnio Linares - Error en TSay
Posts: 401
Joined: Thu Oct 06, 2005 10:15 PM
Para Anotnio Linares - Error en TSay
Posted: Thu Dec 21, 2006 06:05 PM
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:
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
//----------------------------------------------------------------------------//

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

------------------------------------------------------

*/
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Para Anotnio Linares - Error en TSay
Posted: Thu Dec 21, 2006 06:26 PM

Pablo,

Prueba a cambiarlo así:

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

regards, saludos

Antonio Linares
www.fivetechsoft.com

Continue the discussion