Page 1 of 1

Nueva propiedad Alignament para Say Y Get

PostPosted: Mon Jul 26, 2010 1:24 pm
by mastintin
No sé exactamente en donde se debe implementar . Posiblemente en TControl :

Code: Select all  Expand view


#define  LeftTextAlignment      = 0
#define RightTextAlignment     = 1
#define CenterTextAlignment    = 2
#define JustifiedTextAlignment = 3
#define NSNaturalTextAlignment   = 4

METHOD alignment(nAlign)  INLINE  SAYSETALIGMENT (::hWnd,nalign)

----- la funcion -------------------------

HB_FUNC( SAYSETALIGMENT )
{
    NSTextField * say = ( NSTextField * ) hb_parnl( 1 );
    [ say setAlignment : hb_parnl( 2 ) ];
}

 



Tambien sería bueno añadir una data a la Clase Get bChanged y añadir a la clase Twindows en el HandleEvent :
Code: Select all  Expand view

 case nMsg == WM_GETCHANGED
             if oControl != nil
                oControl:Assign()
                //------------------ codigo nuevo------              
                   if !Empty(oControl:bchanged)
                             eval(oControl:bchanged)
                   endif
              //-------------- fin codigo nuevo ----------
 

endif