toolbar, tbitmap, urgente pro favor

toolbar, tbitmap, urgente pro favor

Postby tomafa » Tue Nov 28, 2006 1:02 am

saludos

programando con la version fwh 2.6 y harbour, quize poner un toolbar, todo bien pero pongo una imagen no me aparece trasnparente, como puedo hacer para que me aparesca del color del boton,

esta es la imagen http://img148.imageshack.us/my.php?image=dibujoja8.png
tomafa
 
Posts: 111
Joined: Sun Aug 13, 2006 7:28 pm
Location: ....

Postby Antonio Linares » Tue Nov 28, 2006 2:29 pm

Revisa samples\toolbar1.prg y verás que para añadir una imagen has de hacer:

DEFINE IMGBITMAP OF oImageList NAME "new" COLOR nRGB( 255, 0, 255 )

En donde nRGB( 255, 0, 255 ) -fucsia- indica el color que va a ser transparente y es el mismo que debes usar en el bitmap:

Image
regards, saludos

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

Postby tomafa » Tue Nov 28, 2006 4:53 pm

Antonio

hice lo que me indicaste me fije en el ejemplo de los samples en fwh y viene la instruccion asi

oImageList:AddMasked( TBitmap():Define( "new",, oWnd ), nRGB( 255, 0, 255 ) )
oImageList:AddMasked( TBitmap():Define( "open",, oWnd ), nRGB( 255, 0, 255 ) )

parte de mi codigo es este pero no me pone las imagenes transparentes al boton se ven con el fondo blanco estoy haciendo algo mal

oImgList:= TImageList():New( 32, 32 )
oImgList:AddMasked( oBmp[1] := TBitmap():Define( "TOOL_CLIENTE" ,, oWnd ), nRGB( 255, 0, 255 ) )
oImgList:AddMasked( oBmp[2] := TBitmap():Define( "TOOL_PROVEDOR" ,, oWnd ), nRGB( 255, 0, 255 ) )
oImgList:AddMasked( oBmp[3] := TBitmap():Define( "TOOL_PRODUCTO" ,, oWnd ), nRGB( 255, 0, 255 ) )
oImgList:AddMasked( oBmp[4] := TBitmap():Define( "TOOL_SERVICIOS",, oWnd ), nRGB( 255, 0, 255 ) )
tomafa
 
Posts: 111
Joined: Sun Aug 13, 2006 7:28 pm
Location: ....

Postby goosfancito » Thu Nov 30, 2006 2:23 pm

tomafa wrote:Antonio

hice lo que me indicaste me fije en el ejemplo de los samples en fwh y viene la instruccion asi

oImageList:AddMasked( TBitmap():Define( "new",, oWnd ), nRGB( 255, 0, 255 ) )
oImageList:AddMasked( TBitmap():Define( "open",, oWnd ), nRGB( 255, 0, 255 ) )

parte de mi codigo es este pero no me pone las imagenes transparentes al boton se ven con el fondo blanco estoy haciendo algo mal

oImgList:= TImageList():New( 32, 32 )
oImgList:AddMasked( oBmp[1] := TBitmap():Define( "TOOL_CLIENTE" ,, oWnd ), nRGB( 255, 0, 255 ) )
oImgList:AddMasked( oBmp[2] := TBitmap():Define( "TOOL_PROVEDOR" ,, oWnd ), nRGB( 255, 0, 255 ) )
oImgList:AddMasked( oBmp[3] := TBitmap():Define( "TOOL_PRODUCTO" ,, oWnd ), nRGB( 255, 0, 255 ) )
oImgList:AddMasked( oBmp[4] := TBitmap():Define( "TOOL_SERVICIOS",, oWnd ), nRGB( 255, 0, 255 ) )


Podría llegar a ser el color que le pones a tu imagen en el fondo para que sea transparente.
FWH 21.02
Harbour 3.2.0dev (r2104281802)
Copyright (c) 1999-2021, https://harbour.github.io/
User avatar
goosfancito
 
Posts: 1954
Joined: Fri Oct 07, 2005 7:08 pm

Postby Mike Serra » Thu Nov 30, 2006 7:50 pm

Buenas tomafa:

Es lo mismo que me pasaba a mi, pero si es el blanco es:

RGB(255,255,255)

SALUDOS :D ,

Miguel A.
Mike Serra
 
Posts: 297
Joined: Fri Apr 14, 2006 5:52 pm
Location: Córdoba (España)


Return to FiveWin para Harbour/xHarbour

Who is online

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