FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour How xbrowse' column show and print jpg ?
Posts: 474
Joined: Sun Oct 30, 2005 06:37 AM
How xbrowse' column show and print jpg ?
Posted: Fri Jan 14, 2011 04:02 AM

How xbrowse' column show and print jpg ?
I want like this
oCol := obrow:AddCol()
oCol:bStrData := { ||odb2:cjpgfile+".jpg"}
// or oCol:bStrData := { ||fieldget(5)+".jpg"}
oCol:cHeader := "img"

Thanks !
Shuming Wang

http://www.xtech2.top
Mobile:(86)13802729058
Email:100200651@qq.com
QQ:100200651
Weixin: qq100200651
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: How xbrowse' column show and print jpg ?
Posted: Fri Jan 14, 2011 05:32 AM
Code (fw): Select all Collapse
oCol := obrow:AddCol()
oCol:bEditValue := { ||odb2:cjpgfile+".jpg"}    
oCol:cHeader := "img"
oCol:cDataType := 'F'   // 'F' indicates File name containing imagedata
oCol:nWidth := <provide enough width here>

oBrw:nRowHeight := <provide enough row height to display image"


#1. Use of bStrData is deprecated and still works (with the same limitations) and retained for backward compatibility. Instead please use bEditValue and cEditPicture.

#2. With the above code, the image is shown resized to fit inside the cell area, keeping the proportions of width and height of the image. If the user resizes the width or row height during runtime, the images are suitably resized by xbrowse to fit the cell.

#3. oBrw:Report() prints the image also. oBrw:ToExcel() exports image also into the cell.
Regards



G. N. Rao.

Hyderabad, India
Posts: 474
Joined: Sun Oct 30, 2005 06:37 AM
Re: How xbrowse' column show and print jpg ?
Posted: Fri Jan 14, 2011 08:56 AM

G. N. Rao. ,
TKS!
Shuming Wang

http://www.xtech2.top
Mobile:(86)13802729058
Email:100200651@qq.com
QQ:100200651
Weixin: qq100200651

Continue the discussion