Page 1 of 1

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

Posted: Tue Apr 01, 2008 12:27 am
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:

Posted: Tue Apr 01, 2008 5:56 am
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

Destroy all bitmaps of a Col

Posted: Wed Apr 02, 2008 7:11 pm
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