Imagen en TBTNBMP

Imagen en TBTNBMP

Postby FranciscoA » Sun Dec 31, 2017 9:00 pm

Saludos, amigos.
Usando TBUTTONBMP podemos cargar su imagen con: oBmp:LoadBitMap( aBmps[oBrw:nArrayAt] ) .
Cual seria su equivalente para TBTNBMP?
Gracias
Francisco J. Alegría P.
Chinandega, Nicaragua.

Fwxh1204-MySql-TMySql
User avatar
FranciscoA
 
Posts: 1464
Joined: Fri Jul 18, 2008 1:24 am
Location: Chinandega, Nicaragua, C.A.

Re: Imagen en TBTNBMP

Postby nageswaragunupudi » Mon Jan 01, 2018 3:43 am

oBtn:LoadBitmap( cImageFileName/cResourceName ) and then oBtn:Refresh() works
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 5498
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: Imagen en TBTNBMP

Postby FranciscoA » Mon Jan 01, 2018 3:17 pm

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.
Francisco J. Alegría P.
Chinandega, Nicaragua.

Fwxh1204-MySql-TMySql
User avatar
FranciscoA
 
Posts: 1464
Joined: Fri Jul 18, 2008 1:24 am
Location: Chinandega, Nicaragua, C.A.

Re: Imagen en TBTNBMP

Postby nageswaragunupudi » Mon Jan 01, 2018 4:24 pm

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()
 
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 5498
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: Imagen en TBTNBMP

Postby FranciscoA » Mon Jan 01, 2018 8:56 pm

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.
Francisco J. Alegría P.
Chinandega, Nicaragua.

Fwxh1204-MySql-TMySql
User avatar
FranciscoA
 
Posts: 1464
Joined: Fri Jul 18, 2008 1:24 am
Location: Chinandega, Nicaragua, C.A.


Return to FiveWin para Harbour/xHarbour

Who is online

Users browsing this forum: ACC69 and 8 guests