ttreeview
![Post Post](./styles/prosilver/imageset/icon_post_target.gif)
hi.
I'm trying to implement the use of trees for the first time. Having some trouble. I'd like to have a tree inside a dialog window that is really a tab on a folder control.
here is the code I'm using:
When this code executes I get an error:
Notice I'm not using any code with ID 210 anywhere on my code.
Can someone help?
Reinaldo.
I'm trying to implement the use of trees for the first time. Having some trouble. I'd like to have a tree inside a dialog window that is really a tab on a folder control.
here is the code I'm using:
- Code: Select all Expand view
REDEFINE FOLDER aoFld id 101 of oDlg ;
PROMPTS "&Basic Info", ;
"&Abstract", ;
"&Discharge", ;
"C&onsults", ;
"&Notes", ;
"Do&cuments" ;
DIALOGS "adm_TAB1", ;
"adm_TAB2", ;
"adm_TAB3", ;
"adm_TAB4", ;
"adm_docs"
REDEFINE_Tab1( aoFld:adialogs[1], oDbf)
REDEFINE_Tab2( aoFld:adialogs[2], oDbf)
REDEFINE_Tab3( aoFld:adialogs[3], oDbf )
REDEFINE_Tab4( aoFld:adialogs[4], oDbf )
REDEFINE_documents( aofld:aDialogs[ 12 ], odbf )
.....
*-----------------------------------------------------------------------------------
static function REDEFINE_documents( odlg, odbf )
local oImageList := TImageList():New()
local oBmp1 := TBitmap():Define( "branch",, odlg )
local oBmp2 := TBitmap():Define( "branch_Mask",, odlg )
local oTree := TTreeView():New( 2, 0, oDlg )
local oRep1, oRep2
oImageList:Add( oBmp1, oBmp2 )
oTree:SetImageList( oImageList )
oRep1 := oTree:Add( "Report1" )
oRep1:Add( "Comp1 in Rep1" )
oRep1:Add( "Comp2 in Rep1" )
oRep1:Add( "Comp3 in Rep1" )
oRep1:Add( "Comp4 in Rep1" )
oRep2 := oTree:Add( "Report2" )
oImageList:End()
oBmp1:End()
oBmp2:End()
Return Nil
When this code executes I get an error:
- Code: Select all Expand view
Application
===========
Path and name: F:\mp\test.exe (32 bits)
Size: 2,940,416 bytes
Time from start: 0 hours 0 mins 16 secs
Error occurred at: 09/09/2006, 20:08:28
Error description: Error FiveWin/1 Non defined Id: No: 210
Stack Calls
===========
Called from: CONTROL.PRG => TTREEVIEW:INITIATE(0)
Notice I'm not using any code with ID 210 anywhere on my code.
Can someone help?
Reinaldo.