FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Background checkboxes on xBrowse!? (Solved!)
Posts: 445
Joined: Thu Feb 21, 2008 11:58 AM
Background checkboxes on xBrowse!? (Solved!)
Posted: Thu Jan 15, 2009 06:54 PM
Dear Antonio,

When I use a column with the method setCheck, the image of the "checkbox" and the cursor of xBrowse are the same color!

The background of the image of "checkbox" used must be always white. In version 8.04, I managed to fix that! In this version (8.10), I do can't! How do I fix it?
Peace and lighting!

JĂșlio CĂ©sar M. Ferreira

FWH 8.10 / xHB 1.1.0 / xDevStudio 0.72 / Pelles C 5.0.1 / SQLLIB 1.9
Posts: 445
Joined: Thu Feb 21, 2008 11:58 AM
Re: Background checkboxes on xBrowse!?
Posted: Fri Jan 16, 2009 05:26 PM

Dear friends!

Nobody can help me?

Peace and lighting!

JĂșlio CĂ©sar M. Ferreira

FWH 8.10 / xHB 1.1.0 / xDevStudio 0.72 / Pelles C 5.0.1 / SQLLIB 1.9
Posts: 445
Joined: Thu Feb 21, 2008 11:58 AM
Re: Background checkboxes on xBrowse!?
Posted: Fri Jan 16, 2009 05:52 PM

Better explanation:

Every time when I use checkboxes bitmaps, the fund (background area) them are the color of the cursor xBrowse and not white!
The fund is the area inside the contour of the square to "draw" the checkbox
If the color of cursor into my xbrowse is blue... the fund (background area) of my checkboxes bitmaps stay blue too.

Peace and lighting!

JĂșlio CĂ©sar M. Ferreira

FWH 8.10 / xHB 1.1.0 / xDevStudio 0.72 / Pelles C 5.0.1 / SQLLIB 1.9
Posts: 445
Joined: Thu Feb 21, 2008 11:58 AM
Re: Background checkboxes on xBrowse!?
Posted: Fri Jan 16, 2009 08:20 PM
Special thanks to Daniel Garcia!!

Solved with this:

This method:
METHOD PaintData( nRow, nCol, nHeight, lHighLite, lSelected, nOrder, nPaintRow ) CLASS TXBrwColumn
   ...
   if nBmpNo > 0 .and. nBmpNo <= Len( ::aBitmaps )
      ...

      if lStretch

         nOldColor  := SetBkColor( hDC, nRGB( 255, 255, 255 ) )
         TransBmp( aBitmap[ BITMAP_HANDLE ], aBitmap[ BITMAP_WIDTH ], aBitmap[ BITMAP_HEIGHT ],;
                   aBitmap[ BITMAP_ZEROCLR ], hDC, nRectCol, nRow, Min( nRectWidth,::oBrw:BrwWidth() - nRectCol - 4 ), ;
                   nRectHeight - nRow )
         SetBkColor( hDC, nOldcolor )
/*
      elseif ( lTransparent .or. lBrush ) .and. ! lHighLite

         nOldColor := SetBkColor( hDC, nRGB( 255, 255, 255 ) )
         TransBmp( aBitmap[ BITMAP_HANDLE ], aBitmap[ BITMAP_WIDTH ], aBitmap[ BITMAP_HEIGHT ],;
                   aBitmap[ BITMAP_ZEROCLR ], hDC, nBmpCol, nBmpRow, aBitmap[ BITMAP_WIDTH ], ;
                   aBitmap[ BITMAP_HEIGHT ] )
         SetBkColor( hDC, nOldColor )
*/

      else

         PalBmpDraw( hDC, nBmpRow, nBmpCol,;
                     aBitmap[ BITMAP_HANDLE ],;
                     aBitmap[ BITMAP_PALETTE ],;
                     aBitmap[ BITMAP_WIDTH ],;
                     aBitmap[ BITMAP_HEIGHT ];
                     ,, .F., aColors[ 2 ] )   // changed the parameter lTransparent to .F.

      endif

   endif

return nil


The result:
Peace and lighting!

JĂșlio CĂ©sar M. Ferreira

FWH 8.10 / xHB 1.1.0 / xDevStudio 0.72 / Pelles C 5.0.1 / SQLLIB 1.9

Continue the discussion