How can i use the array < bBmpData > in xBrowse ?

Post Reply
User avatar
ukoenig
Posts: 3981
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany
Contact:

How can i use the array < bBmpData > in xBrowse ?

Post by ukoenig »

Hello,

For xBrowse-testing, i fill the array < bBmpData > with bitmaps.
To see the normal column without bitmap, i set bBmpData := NIL.
It works and i don't see a bitmap in the Col.
When i choose another bitmap for a test, the array is not empty.
the new bitmap is shown after the old ones from before.

Image

Code: Select all


for n = 1 to Len( oLbx1:aCols )
   oLbx1:aCols[ n ]:cHeader = Padr("Font 1", 10)
   oLbx1:aCols[ n ]:oDataFont = xBFont1
   oLbx1:aCols[ n ]:bClrStd := ;
         {|| { BR_TCOLOR, ;
               IF ( EVAL ( oLbx1:bKeyno, NIL, oLbx1 ) %2 == 0, ;
                    BR_COLOR1, BR_COLOR2 ) } }
   IF !empty(e_BRBMP)                             // The selected Bitmap
       cBMP := ALLTRIM(e_BRBMP) + ".BMP"
       oLbx1:aCols[ 1 ]:AddBmpFile(cBMP)
       oLbx1:aCols[ 1 ]:bBmpData := {|| oLbx1:nArrayAt }
   ELSE
       oLbx1:aCols[ 1 ]:bBmpData := NIL   // clears the col from BMP    
   ENDIF
next

How can i clear the Array, so that the next bitmap-test
starts at top of the browser ?

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.
demont frank
Posts: 167
Joined: Thu Mar 22, 2007 11:24 am

Post by demont frank »

In txbrwColumn :

DATA aBitmaps // Two dimension arrays that holds all the bitmaps added
// aBitmaps[n, 1] -> handle
// aBitmaps[n, 2] -> palette
// aBitmaps[n, 3] -> width
// aBitmaps[n, 4] -> heigth

I suppose that you can :

oCol:aBitmaps := {}

Frank
User avatar
ukoenig
Posts: 3981
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany
Contact:

Destroy all bitmaps of a Col

Post by ukoenig »

Hello

The Problem is solved

I used

ASIZE( oLbx1:aCols[1]:aBitmaps,0)

to clear the bitmap-array of Col 1

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.
Post Reply