xbrowse cols smaller than bmp or row lower than bmp height

xbrowse cols smaller than bmp or row lower than bmp height

Postby Otto » Thu Nov 08, 2007 8:02 pm

Image

Image
User avatar
Otto
 
Posts: 6332
Joined: Fri Oct 07, 2005 7:07 pm

Postby Otto » Sat Dec 15, 2007 9:00 am

Antonio, could you please have a look on this.
Thanks in advance,
Otto
Same problem:

http://fivetechsoft.com/forums/viewtopi ... ht=xbrowse

At this momoent it is already possible to browse JPG files in a xBrowse()

But it only works when there is only 1 dataline. Is it possible with xBrowse to combine bitmaps and multiple datalines.

The JPG is not displayed in the middel of the column. When I give the column the exact width it is not displayed completely.

Thanks

Willy
User avatar
Otto
 
Posts: 6332
Joined: Fri Oct 07, 2005 7:07 pm

Postby Otto » Thu Dec 20, 2007 5:21 pm

Antonio, I found the problem.

METHOD PaintData

If you have only a bmp elseif AL_LEFT is never executed.

I comment out the whole if endif and use:
nBmpCol := nCol
This way the bmp's are displayed correctly.
Regards
Otto



if ::bStrData == nil
nBmpCol := nCol + ( ( nWidth - aBitmap[ BITMAP_WIDTH ] ) / 2 ) + 2

elseif ::nDataBmpAlign == AL_LEFT
nBmpCol := nCol
nCol += aBitmap[ BITMAP_WIDTH ] + BMP_EXTRAWIDTH
else
nBmpCol := nCol + nWidth
endif
User avatar
Otto
 
Posts: 6332
Joined: Fri Oct 07, 2005 7:07 pm

Postby Richard Chidiak » Tue Mar 04, 2008 8:27 am

Antonio

Can you apply Otto's fix to fwh 8.03

When there is no data, bmp is badly displayed,

With Otto's fix it works OK

Thanks

Richard
http://www.cbati.com

Uestudio
Fwh 13.05 Harbour 3.2 MSVC 2013
User avatar
Richard Chidiak
 
Posts: 946
Joined: Thu Oct 06, 2005 7:05 pm
Location: France

Postby Antonio Linares » Tue Mar 04, 2008 8:37 am

Richard, Otto,

We have already implemented it for 8.03. This code is placed from line 3983:

Code: Select all  Expand view  RUN
   if nBmpNo > 0 .and. nBmpNo <= Len( ::aBitmaps )
      aBitmap := ::aBitmaps[ nBmpNo ]
      nWidth  -= aBitmap[ BITMAP_WIDTH ]
      if ::bStrData == nil
         nBmpCol := nCol + ( ( nWidth - aBitmap[ BITMAP_WIDTH ] ) / 2 ) + 2
      elseif ::nDataBmpAlign == AL_LEFT
         nBmpCol := nCol
         nCol    += aBitmap[ BITMAP_WIDTH ] + BMP_EXTRAWIDTH
      else
         nBmpCol := nCol + nWidth
      endif

Unless you mean another place for it, thanks!
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42107
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 66 guests