Antonio Linares sobre tget

Antonio Linares sobre tget

Postby Wanderson » Mon Mar 24, 2008 6:22 pm

Olá Antônio,

Em Fwh0802 los gets con opcion when .f. me mostran em gray color, como mostrar nas colores como nos demais gets en la version 0710 del fwh?

fwh0710

http://img329.imageshack.us/my.php?image=fwh0710yw5.jpg

fwh0802

http://img137.imageshack.us/my.php?image=fwh0802lw0.jpg

Onde devo alterar la classe tget?

Gracias.

[/img]
Wanderson
 
Posts: 332
Joined: Thu Nov 17, 2005 9:11 pm

Postby karinha » Mon Mar 24, 2008 6:30 pm

Wanderson,

Code: Select all  Expand view

//-> Inicio da classe
#define ES_CENTER            1
#define ES_RIGHT             2
#define ES_LEFT              0
#Define TA_LEFT              0
#Define TA_RIGHT             2
#Define TA_CENTER            6

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

METHOD Paint() CLASS TGet

   local aInfo := ::DispBegin()
   Local hOldFont

   //-> Mudan‡as Feitas em 22/12/2005 Por Antonio Linares
   //-> Para que o When(.F.) do GET, fique colorido normal. Muito bom. Joao.

   if ::oBrush != nil
      FillRect( ::hDC, GetClientRect( ::hWnd ), ::oBrush:hBrush )
   else
      CallWindowProc( ::nOldProc, ::hWnd, WM_ERASEBKGND, ::hDC, 0 )
   endif

   if IsWindowEnabled( ::hWnd )

      CallWindowProc( ::nOldProc, ::hWnd, WM_PAINT, ::hDC, 0 )

      //-> Para BTNGET.PRG Quando o RIGHT Esta ligado no WorkShop.exe
      //-> Modificado em 20/02/2008 - Por Joao Santos

      SetTextColor( ::hDC, ::nClrText )
      SetBkColor( ::hDC, ::nClrPane )
      hOldFont = SelectObject( ::hDC, ::oFont:hFont )

      do case

         case lAnd( GetWindowLong( ::hWnd, GWL_STYLE ), ES_RIGHT )

              SetTextAlign( ::hDC, TA_RIGHT )

              ExtTextOut( ::hDC, 0, ::nWidth()  - 44,                        ;
              { 0, 0, ::nHeight(), ::nWidth() }, GetWindowText( ::hWnd ) )

      endcase

   else

      SetTextColor( ::hDC, ::nClrText )
      SetBkColor( ::hDC, ::nClrPane )
      hOldFont = SelectObject( ::hDC, ::oFont:hFont )
     
      do case
         case lAnd( GetWindowLong( ::hWnd, GWL_STYLE ), ES_CENTER )
              SetTextAlign( ::hDC, TA_CENTER )
              ExtTextOut( ::hDC, 0, ::nWidth() / 2,                           ;
              { 0, 0, ::nHeight(), ::nWidth() }, GetWindowText( ::hWnd ) )
             
         case lAnd( GetWindowLong( ::hWnd, GWL_STYLE ), ES_RIGHT )
              SetTextAlign( ::hDC, TA_RIGHT )
              ExtTextOut( ::hDC, 0, ::nWidth() - 4,                           ;
              { 0, 0, ::nHeight(), ::nWidth() }, GetWindowText( ::hWnd ) )

         otherwise

              SetTextAlign( ::hDC, TA_LEFT )

              //-> Posicao do Get
              ExtTextOut( ::hDC, 0, 4,                                        ;
              { 0, 0, ::nHeight(), ::nWidth() }, GetWindowText( ::hWnd ) )
      endcase

      SelectObject( ::hDC, hOldFont )

   endif

   if ValType( ::bPainted ) == "B"
      Eval( ::bPainted, ::hDC, ::cPS, Self )
   endif

   ::DispEnd( aInfo )

return 1

Veja se o seu METHOD Paint() Esta Assim.

Abracos.
João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
User avatar
karinha
 
Posts: 7257
Joined: Tue Dec 20, 2005 7:36 pm
Location: São Paulo - Brasil

Postby Wanderson » Tue Mar 25, 2008 1:46 am

karinha wrote:Wanderson,

Code: Select all  Expand view

//-> Inicio da classe
#define ES_CENTER            1
#define ES_RIGHT             2
#define ES_LEFT              0
#Define TA_LEFT              0
#Define TA_RIGHT             2
#Define TA_CENTER            6

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

METHOD Paint() CLASS TGet

   local aInfo := ::DispBegin()
   Local hOldFont

   //-> Mudan‡as Feitas em 22/12/2005 Por Antonio Linares
   //-> Para que o When(.F.) do GET, fique colorido normal. Muito bom. Joao.

   if ::oBrush != nil
      FillRect( ::hDC, GetClientRect( ::hWnd ), ::oBrush:hBrush )
   else
      CallWindowProc( ::nOldProc, ::hWnd, WM_ERASEBKGND, ::hDC, 0 )
   endif

   if IsWindowEnabled( ::hWnd )

      CallWindowProc( ::nOldProc, ::hWnd, WM_PAINT, ::hDC, 0 )

      //-> Para BTNGET.PRG Quando o RIGHT Esta ligado no WorkShop.exe
      //-> Modificado em 20/02/2008 - Por Joao Santos

      SetTextColor( ::hDC, ::nClrText )
      SetBkColor( ::hDC, ::nClrPane )
      hOldFont = SelectObject( ::hDC, ::oFont:hFont )

      do case

         case lAnd( GetWindowLong( ::hWnd, GWL_STYLE ), ES_RIGHT )

              SetTextAlign( ::hDC, TA_RIGHT )

              ExtTextOut( ::hDC, 0, ::nWidth()  - 44,                        ;
              { 0, 0, ::nHeight(), ::nWidth() }, GetWindowText( ::hWnd ) )

      endcase

   else

      SetTextColor( ::hDC, ::nClrText )
      SetBkColor( ::hDC, ::nClrPane )
      hOldFont = SelectObject( ::hDC, ::oFont:hFont )
     
      do case
         case lAnd( GetWindowLong( ::hWnd, GWL_STYLE ), ES_CENTER )
              SetTextAlign( ::hDC, TA_CENTER )
              ExtTextOut( ::hDC, 0, ::nWidth() / 2,                           ;
              { 0, 0, ::nHeight(), ::nWidth() }, GetWindowText( ::hWnd ) )
             
         case lAnd( GetWindowLong( ::hWnd, GWL_STYLE ), ES_RIGHT )
              SetTextAlign( ::hDC, TA_RIGHT )
              ExtTextOut( ::hDC, 0, ::nWidth() - 4,                           ;
              { 0, 0, ::nHeight(), ::nWidth() }, GetWindowText( ::hWnd ) )

         otherwise

              SetTextAlign( ::hDC, TA_LEFT )

              //-> Posicao do Get
              ExtTextOut( ::hDC, 0, 4,                                        ;
              { 0, 0, ::nHeight(), ::nWidth() }, GetWindowText( ::hWnd ) )
      endcase

      SelectObject( ::hDC, hOldFont )

   endif

   if ValType( ::bPainted ) == "B"
      Eval( ::bPainted, ::hDC, ::cPS, Self )
   endif

   ::DispEnd( aInfo )

return 1

Veja se o seu METHOD Paint() Esta Assim.

Abracos.



Obrigado Karinha, foi só comentar o bloco onde a classe tget testava a propriedade ldiscolors. Valeu demais a ajuda.
Wanderson
 
Posts: 332
Joined: Thu Nov 17, 2005 9:11 pm

Postby Antonio Linares » Tue Mar 25, 2008 9:23 am

Wanderson,

Modificando lDisColors ha sido suficiente, si ?
regards, saludos

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

Postby karinha » Tue Mar 25, 2008 1:25 pm

Antonio Linares wrote:Wanderson,

Modificando lDisColors ha sido suficiente, si ?


Maestro, lDisColors() és un comando nuevo de la nueva version de FIVEWIN the best??

Best regards, saludos.
João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
User avatar
karinha
 
Posts: 7257
Joined: Tue Dec 20, 2005 7:36 pm
Location: São Paulo - Brasil

Postby Wanderson » Tue Mar 25, 2008 1:32 pm

Antonio Linares wrote:Wanderson,

Modificando lDisColors ha sido suficiente, si ?


si a mi funciono muy bien. gracias.
Wanderson
 
Posts: 332
Joined: Thu Nov 17, 2005 9:11 pm

Postby Antonio Linares » Tue Mar 25, 2008 4:22 pm

João,

Si, es una nueva DATA de la Clase TGet
regards, saludos

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

Postby karinha » Tue Mar 25, 2008 4:29 pm

Antonio Linares wrote:João,

Si, es una nueva DATA de la Clase TGet


Gracias, querido Maestro.

Regards.
João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
User avatar
karinha
 
Posts: 7257
Joined: Tue Dec 20, 2005 7:36 pm
Location: São Paulo - Brasil


Return to FiveWin para Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 18 guests