Para Anotnio Linares - Error en TSay

Para Anotnio Linares - Error en TSay

Postby pablovidal » Thu Dec 21, 2006 6: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:
Code: Select all  Expand view
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  Expand view
//----------------------------------------------------------------------------//

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
pablovidal
 
Posts: 401
Joined: Thu Oct 06, 2005 10:15 pm
Location: Republica Dominicana

Postby Antonio Linares » Thu Dec 21, 2006 6:26 pm

Pablo,

Prueba a cambiarlo así:

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

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 41940
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain


Return to FiveWin para Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 67 guests