My sample is below. I want to print "Apple","Orange","Banana","Pear" instead of 1,2,3,4 at 6. column.
Is there any solution?
Thanks,
- Code: Select all Expand view
- #include "FiveWin.Ch"
#include "xbrowse.ch"
//------------------------------------------------------------------//
function Main()
local aData := { ;
{ 1, 'One', 45, date(), 23456, 1 }, ;
{ 2, 'Two', 2222, date()-1, 345, 2 } , ;
{ 3, 'Three', 3333, date()-2, 789, 3 }, ;
{ 4, 'Four', 4444, date()-3, 234, 4 } }
local oDlg, oBrw
local aType := {"Apple","Orange","Banana","Pear"}
DEFINE DIALOG oDlg SIZE 440,240 PIXEL
@ 10,10 XBROWSE oBrw SIZE 200,100 PIXEL OF oDlg ;
COLUMNS 1, 2, 3, 4, 5, 6 ;
HEADERS 'No', 'Description', 'Number', 'Date', 'Number-2', 'Type' ;
ARRAY aData ;
ON DBLCLICK MsgInfo( 'ok' ) ;
MESSAGE 'my message'
WITH OBJECT oBrw
:lHScroll := .F.
:nMarqueeStyle := MARQSTYLE_HIGHLROW
:nColDividerStyle := LINESTYLE_RAISED
:nRowDividerStyle := LINESTYLE_RAISED
:nStretchCol := STRETCHCOL_WIDEST
:CreateFromCode()
END
if ! Empty( oCol := oBrw:oCol( "Type" ) )
// oCol:bStrData := {|o| ?????????
endif
ACTIVATE DIALOG oDlg CENTERED
return ( 0 )