xBrowse - Bitmap - JPG

xBrowse - Bitmap - JPG

Postby Willy » Mon Sep 10, 2007 8:43 pm

Hello,

I saw an example to use BMP files in a xBrowse()

Is it also possible to use JPG files.

Thanks,

Willy
Willy
 
Posts: 117
Joined: Thu Mar 02, 2006 11:06 am
Location: Belgium

Postby R.F. » Tue Sep 11, 2007 3:04 am

It's not possible, image for using in browses (any kind) should be always BMPs in files or resources.
Saludos
R.F.
R.F.
 
Posts: 840
Joined: Thu Oct 13, 2005 7:05 pm

Postby Antonio Linares » Tue Sep 11, 2007 6:12 am

Willy,

You have to use a TImage object that reads the JPG and convert it into a BMP automatically in memory.
regards, saludos

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

Postby Willy » Tue Sep 11, 2007 7:22 am

Thanks,

Is there an example.

Greetings,

Willy.
Willy
 
Posts: 117
Joined: Thu Mar 02, 2006 11:06 am
Location: Belgium

Postby Willy » Wed Sep 12, 2007 7:59 am

Therefore I should have to change the txBrowse class.

However this is a complex situation I will give it a try.

Any tips how to start this ?

Thanks,

Willy
Willy
 
Posts: 117
Joined: Thu Mar 02, 2006 11:06 am
Location: Belgium

Postby Antonio Linares » Thu Sep 13, 2007 10:11 am

Willy,

Try this:
Code: Select all  Expand view  RUN
METHOD AddJpgFile( cJpgFile ) CLASS TXBrwColumn

   local hBmp := FILoadImg( cJpgFile )

   AAdd( ::aBitmaps, { hBmp, nBmpWidth( hBmp ), nBmpHeight( hBmp ) } )

return .t.
regards, saludos

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

Postby Willy » Thu Sep 13, 2007 10:44 am

Thanks Antonio,

I test this as soon as possible

Willy
Willy
 
Posts: 117
Joined: Thu Mar 02, 2006 11:06 am
Location: Belgium

Postby Willy » Fri Sep 14, 2007 12:23 pm

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
Willy
 
Posts: 117
Joined: Thu Mar 02, 2006 11:06 am
Location: Belgium


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 97 guests