BUTTONBMP el bmp sale encima del texto

BUTTONBMP el bmp sale encima del texto

Postby fleal » Wed Nov 23, 2005 5:05 am

Hola foro,
compile el TextBuBm.prg pero solo viene el bitmap con el botón. Bien,,, pues ya tiene texto.
He logrado hacer lo siguiente
REDEFINE BUTTONBMP oBtn ID 702 OF oDlg ;
BITMAP "Acerca.BMP" ;

Pero el Bitmap aparece encima del texto... ¿Cómo le hago para que el bitmap apareca a la izquierda??

Saludos
fleal
 
Posts: 234
Joined: Tue Oct 25, 2005 12:39 am
Location: México, DF

Postby Antonio Linares » Mon Nov 28, 2005 6:37 am

En el método Paint() de la Clase TButtonBmp hay este código:

if ! Empty( ::hBitmap )
nTop = ( ::nHeight() / 2 ) - ( nBmpHeight( ::hBitmap ) / 2 )
nLeft = ( ::nWidth() / 2 ) - ( nBmpWidth( ::hBitmap ) / 2 )
if ::lActive
DrawMasked( ::hDC, ::hBitmap, nTop + If( lPressed, 1, 0 ),;
nLeft + If( lPressed, 1, 0 ) )
else
DrawGray( ::hDC, ::hBitmap, nTop + If( lPressed, 1, 0 ),;
nLeft + If( lPressed, 1, 0 ) )
endif
endif

Sólo tienes que modificar nLeft para que se situe más a la izquierda.
regards, saludos

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

Postby fleal » Wed Nov 30, 2005 3:15 am

Gracias Antonio
fleal
 
Posts: 234
Joined: Tue Oct 25, 2005 12:39 am
Location: México, DF


Return to FiveWin para Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 35 guests