FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin para Harbour/xHarbour BUTTONBMP el bmp sale encima del texto
Posts: 234
Joined: Tue Oct 25, 2005 12:39 AM

BUTTONBMP el bmp sale encima del texto

Posted: Wed Nov 23, 2005 05: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

Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM

BUTTONBMP el bmp sale encima del texto

Posted: Mon Nov 28, 2005 06: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
Posts: 234
Joined: Tue Oct 25, 2005 12:39 AM

BUTTONBMP el bmp sale encima del texto

Posted: Wed Nov 30, 2005 03:15 AM

Gracias Antonio

Continue the discussion