Set oCol image with xBrowse binary column

Set oCol image with xBrowse binary column

Postby fraxzi » Thu Jun 17, 2010 8: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
User avatar
fraxzi
 
Posts: 811
Joined: Tue May 06, 2008 4:28 am
Location: Philippines

Re: Set oCol image with xBrowse binary column

Postby nageswaragunupudi » Thu Jun 17, 2010 4: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
User avatar
nageswaragunupudi
 
Posts: 10628
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: Set oCol image with xBrowse binary column

Postby fraxzi » 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
User avatar
fraxzi
 
Posts: 811
Joined: Tue May 06, 2008 4:28 am
Location: Philippines

Re: Set oCol image with xBrowse binary column

Postby nageswaragunupudi » Fri Jun 18, 2010 7: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
User avatar
nageswaragunupudi
 
Posts: 10628
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: Set oCol image with xBrowse binary column

Postby nageswaragunupudi » Fri Jun 18, 2010 7: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
User avatar
nageswaragunupudi
 
Posts: 10628
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: Set oCol image with xBrowse binary column

Postby fraxzi » Fri Jun 18, 2010 7:47 am

Dear RAO,

Now I can select which bitmap to display
Code: Select all  Expand view

oCol:AddResource('img1')
oCol:AddResource('img2')
oCol:AddResource('img3')
...

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


but how to determine say.. oBrw:arraydata[ oBrw:nArrayAt] [ 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
User avatar
fraxzi
 
Posts: 811
Joined: Tue May 06, 2008 4:28 am
Location: Philippines

Re: Set oCol image with xBrowse binary column

Postby fraxzi » Fri Jun 18, 2010 8: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
User avatar
fraxzi
 
Posts: 811
Joined: Tue May 06, 2008 4:28 am
Location: Philippines


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot], Marc Venken and 75 guests