- Code: Select all Expand view
#include "FiveWin.Ch"
#include "xbrowse.ch"
//------------------------------------------------------------------//
function Main()
local oDlg, oBrw
local h := ReCreatehash()
DEFINE DIALOG oDlg
@ 15,5 XBROWSE oBrw SIZE -5,-5 PIXEL OF oDlg ;
ARRAY h AUTOCOLS HEADERS 'Detail', 'Value' ;
CELL LINES NOBORDER
oBrw:nStretchCol := 1
oBrw:CreateFromCode()
@ 1,5 button "refresh" ACTION obrw:setArray( Refreshhash() ) pixel
ACTIVATE DIALOG oDlg CENTERED
return ( 0 )
//------------------------------------------------------------------//
Function ReCreatehash()
local h := {=>}
h["Age"] := 45
h["City"] := 'NewYork'
h["JoinDt"] := {^ 1997/12/21}
h["First"] := 'John'
h["Last"] := 'Abraham'
Return h
//------------------------------------------------------------------//
Function Refreshhash()
local h := {=>}
h["Age"] := 48
h["City"] := 'Paris'
h["JoinDt"] := {^ 1997/12/21}
h["First"] := 'Jose'
h["Last"] := 'Arias'
Return h