by nageswaragunupudi » Sun Nov 10, 2019 8:33 am
This is another simple way to achieve the same effect, without creating any additional control like XImage, Image or Bitmap. This sample uses xbrowse's built-in capabilities to display images.
- Code: Select all Expand view
#include "fivewin.ch"
function Main()
local oCn, oRs, oBrw, oDlg, oFont
oCn := FW_DemoDB()
oRs := oCn:RowSet( "wwonders" )
DEFINE FONT oFont NAME "TAHOMA" SIZE 0,-14
DEFINE DIALOG oDlg SIZE 900,500 PIXEL TRUEPIXEL FONT oFont
@ 20,20 XBROWSE oBrw SIZE -20,-20 PIXEL OF oDlg ;
DATASOURCE oRs ;
COLUMNS "NAME", "DETAILS", "IMAGE" ;
COLSIZES 150,250 ;
LINES NOBORDER
WITH OBJECT oBrw
:nHeadStrAligns := AL_CENTER
:nStretchCol := 3
:nRowHeight := 80
:oRightCol := :image
WITH OBJECT :oRightCol
:lFullHeight := .t.
:nDataBmpAlign := AL_CENTER
END
//
:CreateFromCode()
END
ACTIVATE DIALOG oDlg CENTERED
RELEASE FONT oFont
oRs:Close()
oCn:Close()
return nil
Regards
G. N. Rao.
Hyderabad, India