Page 1 of 1

Imagen en TBTNBMP

PostPosted: Sun Dec 31, 2017 9:00 pm
by FranciscoA
Saludos, amigos.
Usando TBUTTONBMP podemos cargar su imagen con: oBmp:LoadBitMap( aBmps[oBrw:nArrayAt] ) .
Cual seria su equivalente para TBTNBMP?
Gracias

Re: Imagen en TBTNBMP

PostPosted: Mon Jan 01, 2018 3:43 am
by nageswaragunupudi
oBtn:LoadBitmap( cImageFileName/cResourceName ) and then oBtn:Refresh() works

Re: Imagen en TBTNBMP

PostPosted: Mon Jan 01, 2018 3:17 pm
by FranciscoA
Mr. Rao, thanks for reply.
If I do ;
oVent:LoadBitMap( , aBmps[oBrw:nArrayAt] )
oVent:Refresh()
I Get this error Message not found TBTNBMP:LOADBITMAP.

But if I do oVent:LoadBitmaps( aBmps[oBrw:nArrayAt] ) , it works.

Thanks again.

Re: Imagen en TBTNBMP

PostPosted: Mon Jan 01, 2018 4:24 pm
by nageswaragunupudi
Sorry, I thought you were asking about ButtonBmp

ButtonBmp:

Code: Select all  Expand view

oBtn:LoadBitmap( uImage )
oBtn:Refresh()
 


BtnBmp:

FWH1601 onwards:
Code: Select all  Expand view

oBtn:SetImages( uImage ) // Refresh() is automatic
 

Full syntax: oBtn:SetImages( [uImage1], [uImage2], [uImage3], [uImage4] )

Upto FWH1512:

Code: Select all  Expand view

PalBmpFree( oBtn:hBitmap1, oBtn:hPalette1 )
oBtn:LoadBitmaps( uImage )
oBtn:Refresh()
 

Re: Imagen en TBTNBMP

PostPosted: Mon Jan 01, 2018 8:56 pm
by FranciscoA
Rao, thank you very much.

Code: Select all  Expand view
   if oBtn:CLASSNAME() == "TBUTTONBMP"
       oBtn:LoadBitMap( aBmps[oBrw:nArrayAt] )
       oBtn:Refresh()
    elseif oBtn:CLASSNAME() == "TBTNBMP"
       PalBmpFree( oBtn:hBitmap1, oBtn:hPalette1 )
       oBtn:LoadBitmaps( aBmps[oBrw:nArrayAt] )  
       oBtn:Refresh()
    endif
 

Regards.