Encontré esto en samples, pero no lo pude adaptar para Dolphin
- Code: Select all Expand view
- function TestTree1()
local oDlg, oBrw
USE CUSTOMER NEW
SET ORDER TO TAG STATE
GO TOP
DEFINE DIALOG oDlg SIZE 800,400 PIXEL TRUEPIXEL
@ 60,20 XBROWSE oBrw SIZE -20,-20 PIXEL OF oDlg ;
DATASOURCE Alias() ;
COLUMNS "STATE", "CITY", "STREET", "ZIP", "AGE" ;
CELL LINES NOBORDER
oBrw:lDisplayZeros := .f.
oBrw:CreateFromCode()
@ 10, 20 BTNBMP PROMPT "TREE" SIZE 150,30 PIXEL OF oDlg FLAT ;
WHEN oBrw:nDataType == DATATYPE_RDD ;
ACTION oBrw:SetTree( 3, { 0x30082, 0x30084, 0x20097 } )
@ 10,200 BTNBMP PROMPT "DBF" SIZE 150,30 PIXEL OF oDlg FLAT ;
WHEN oBrw:nDataType != DATATYPE_RDD ;
ACTION ( CUSTOMER->( oBrw:SetRDD( nil, nil, { "STATE", "CITY", "STREET", "ZIP", "AGE" } ) ), ;
oBrw:GoTop() )
ACTIVATE DIALOG oDlg CENTERED
CLOSE CUSTOMER
return nil