Any sample using < ChangeImg > of class TTitle ?

Any sample using < ChangeImg > of class TTitle ?

Postby ukoenig » Tue Nov 27, 2012 4:47 pm

Hello,

any sample of usage METHOD ChangeImgg of class TTitle ?
Tested, but returns a error
I want to replace the first defined Image with the new Image < cFile[1] >

The first Image :
@ 10, 10 TITLEIMG oImg[1] OF oTitle BITMAP cFile[5] SIZE 80, 80 REFLEX TRANSPARENT ANIMA
Changing cFile[5] to cFile[1]
oTitle:ChangeImg( cFile[1], 1 )

Error description: Error BASE/1004 Class: 'NIL' has no exported method: CHANGEIMG
Args:
[ 1] = U
[ 2] = C D:\P_QUOTATION\SYSTEM\Star5b.bmp
[ 3] = N 1

METHOD ChangeImg( cBitmap, nImg ) // change image in ::aImgs nImg position

Best Regards
Uwe :?:
Since 1995 ( the first release of FW 1.9 )
i work with FW.
If you have any questions about special functions, maybe i can help.
User avatar
ukoenig
 
Posts: 4043
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany

Re: Any sample using < ChangeImg > of class TTitle ?

Postby Gale FORd » Tue Nov 27, 2012 5:44 pm

It looks like the method ChangeImg is there. You could also call oTitle:LoadBitmaps() directly, see below.
Code: Select all  Expand view

//----------------------------------------------------------------------------//

METHOD ChangeImg( cBitmap, nImg ) CLASS TTitle
   DEFAULT nImg := 1
   ::LoadBitmaps( cBitmap, , , , , ;
                    , , , ;
                    , , nImg )
RETURN NIL  

 
Gale FORd
 
Posts: 663
Joined: Mon Dec 05, 2005 11:22 pm
Location: Houston

Re: Any sample using < ChangeImg > of class TTitle ?

Postby Enrico Maria Giordano » Tue Nov 27, 2012 5:50 pm

oTitle is NIL at the moment you try to call its ChangeImg() method.

EMG
User avatar
Enrico Maria Giordano
 
Posts: 8713
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: Any sample using < ChangeImg > of class TTitle ?

Postby ukoenig » Tue Nov 27, 2012 7:38 pm

Gale, Enrico,
Thank You, it works fine now

oTitle has been defined STATIC, but was NIL inside the Function.

because of needed resizing, I cannot use ChangeImg ( shows full size ), I had to use :

oTitle:LoadBitmaps( cFile[1], , ,80,80, , , , , , 1 )

Best Regards
Uwe :lol:
Since 1995 ( the first release of FW 1.9 )
i work with FW.
If you have any questions about special functions, maybe i can help.
User avatar
ukoenig
 
Posts: 4043
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 66 guests