xBrowse - Bitmap - JPG

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

xBrowse - Bitmap - JPG

Post by Willy »

Hello,

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

Is it also possible to use JPG files.

Thanks,

Willy
R.F.
Posts: 840
Joined: Thu Oct 13, 2005 7:05 pm

Post by R.F. »

It's not possible, image for using in browses (any kind) should be always BMPs in files or resources.
Saludos
R.F.
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Post by Antonio Linares »

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

Post by Willy »

Thanks,

Is there an example.

Greetings,

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

Post by Willy »

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
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Post by Antonio Linares »

Willy,

Try this:

Code: Select all

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

Post by Willy »

Thanks Antonio,

I test this as soon as possible

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

Post by Willy »

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