FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Set oCol image with xBrowse binary column
Posts: 811
Joined: Tue May 06, 2008 04:28 AM
Set oCol image with xBrowse binary column
Posted: Thu Jun 17, 2010 08:53 AM

Dear All,

I have array in xBrowse.. 1st element has binary or image content.. how can I display an image to the column if element not image?
right now, xBrowse display tiny version of image.. I want to put other image not just '<binary>' to the column..

Any help?

Regards,
Frances

Kind Regards,

Frances



Fivewin for xHarbour v18.07

xHarbour v1.2.3.x

BCC 7.3 + PellesC8 ( Resource Compiler only)

ADS 10.1 / MariaDB

Crystal Reports 8.5/9.23 DE

xMate v1.15
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: Set oCol image with xBrowse binary column
Posted: Thu Jun 17, 2010 04:15 PM

Just define xbrowse as if it is a normal text.
If it is an image, it shows the image and if it is text, it shows it as text.

Simple, we don't have to do anything.

Regards



G. N. Rao.

Hyderabad, India
Posts: 811
Joined: Tue May 06, 2008 04:28 AM
Re: Set oCol image with xBrowse binary column
Posted: Fri Jun 18, 2010 12:12 AM

Dear RAO,

If column value is image, shows tiny image.. this is good. but if other type i want to put my own image.. how to determine if column type is other than image?

Regards,

Frances

Kind Regards,

Frances



Fivewin for xHarbour v18.07

xHarbour v1.2.3.x

BCC 7.3 + PellesC8 ( Resource Compiler only)

ADS 10.1 / MariaDB

Crystal Reports 8.5/9.23 DE

xMate v1.15
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: Set oCol image with xBrowse binary column
Posted: Fri Jun 18, 2010 07:37 AM
fraxzi wrote:Dear RAO,

If column value is image, shows tiny image.. this is good.


The image is resized ( retaining the proportions ) to fit the size of the cell. We can have larger image by increasing the width and height of the cell, either at programmer's level or dynamically at the user level.
Regards



G. N. Rao.

Hyderabad, India
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: Set oCol image with xBrowse binary column
Posted: Fri Jun 18, 2010 07:41 AM
fraxzi wrote:Dear RAO,

but if other type i want to put my own image.. how to determine if column type is other than image?


oCol:bEditValue := { || If( IsBinaryData( oBrw:aRow[ oCol:nArrayCol ] ) .and. FITypeFromMemory( oBrw:aRow[oCol:nArrayCol] <= 0, <cOurImage>, oBrw:aRow[oCol:nArrayCol] ) }
Regards



G. N. Rao.

Hyderabad, India
Posts: 811
Joined: Tue May 06, 2008 04:28 AM
Re: Set oCol image with xBrowse binary column
Posted: Fri Jun 18, 2010 07:47 AM
Dear RAO,

Now I can select which bitmap to display
Code (fw): Select all Collapse
oCol:AddResource('img1')
oCol:AddResource('img2')
oCol:AddResource('img3')
...

oCol:bBmpData  := { || 2 }  //displays 'img2'
...


but how to determine say.. oBrw:arraydata[ oBrw] [ 1 ] if the content is binary or image or text?


Regards,
Frances
Kind Regards,

Frances



Fivewin for xHarbour v18.07

xHarbour v1.2.3.x

BCC 7.3 + PellesC8 ( Resource Compiler only)

ADS 10.1 / MariaDB

Crystal Reports 8.5/9.23 DE

xMate v1.15
Posts: 811
Joined: Tue May 06, 2008 04:28 AM
Re: Set oCol image with xBrowse binary column
Posted: Fri Jun 18, 2010 08:06 AM

Dear Mr. RAO,

thank you!

Regards,
Frances

Kind Regards,

Frances



Fivewin for xHarbour v18.07

xHarbour v1.2.3.x

BCC 7.3 + PellesC8 ( Resource Compiler only)

ADS 10.1 / MariaDB

Crystal Reports 8.5/9.23 DE

xMate v1.15

Continue the discussion