Carpetas a Treeview
Publicado por Maria Antonieta (147 intervenciones) el 22/08/2007 18:11:30
Hola amigos de LWP:
Estoy aprendiendo a usar el Treeview y quiero pasar los directorios a este:
Tengo un sistema que contienes subcarpetas algo asi:
Sistema
Sistema\Cia01\a_2005
Sistema\Cia01\a_2006
Sistema\Cia01\a_2007
Sistema\Cia02\a_2005
Sistema\Cia02\a_2006
Sistema\Cia02\a_2007
****Con este codigo obtuve el arreglo, hasta ahi solucionado:
Tdir= ADIR(Misd,'*.*','D')
FOR Cd=1 TO Tdir
IF Misd(Cd,5)='....D' AND Misd(Cd,1)#'.' AND Misd(Cd,1)#'..'
? Misd(Cd,1)
endif
ENDFOR
**** Tengo un ejemplo de Treeview algo asi:
this.oBJECT.Nodes.Add(,4,"PER","Personal")
this.oBJECT.Nodes.Add(,4,"RES","Resultados")
this.oBJECT.Nodes.Add(,4,"VAC","Vacaciones")
this.oBJECT.Nodes.Add("PER",4,"PER1","Trabajadores")
this.oBJECT.Nodes.Add("PER",4,"PER2","Derechohabientes")
this.oBJECT.Nodes.Add("RES",4,"RES1","Boletas")
this.oBJECT.Nodes.Add("RES",4,"RES2","Planillas")
this.obJECT.Nodes.Add("VAC",4,"VAC1","Programación de fechas")
this.obJECT.Nodes.Add("VAC",4,"VAC2","Cálculo")
this.object.LineStyle= 1
this.obJECT.SingleSel= .t.
this.objECT.HotTracking= .t.
Lo que no se es como meter el arreglo en mi Treeview.
Espero me ayuden con su paciencia.
Saludos
Estoy aprendiendo a usar el Treeview y quiero pasar los directorios a este:
Tengo un sistema que contienes subcarpetas algo asi:
Sistema
Sistema\Cia01\a_2005
Sistema\Cia01\a_2006
Sistema\Cia01\a_2007
Sistema\Cia02\a_2005
Sistema\Cia02\a_2006
Sistema\Cia02\a_2007
****Con este codigo obtuve el arreglo, hasta ahi solucionado:
Tdir= ADIR(Misd,'*.*','D')
FOR Cd=1 TO Tdir
IF Misd(Cd,5)='....D' AND Misd(Cd,1)#'.' AND Misd(Cd,1)#'..'
? Misd(Cd,1)
endif
ENDFOR
**** Tengo un ejemplo de Treeview algo asi:
this.oBJECT.Nodes.Add(,4,"PER","Personal")
this.oBJECT.Nodes.Add(,4,"RES","Resultados")
this.oBJECT.Nodes.Add(,4,"VAC","Vacaciones")
this.oBJECT.Nodes.Add("PER",4,"PER1","Trabajadores")
this.oBJECT.Nodes.Add("PER",4,"PER2","Derechohabientes")
this.oBJECT.Nodes.Add("RES",4,"RES1","Boletas")
this.oBJECT.Nodes.Add("RES",4,"RES2","Planillas")
this.obJECT.Nodes.Add("VAC",4,"VAC1","Programación de fechas")
this.obJECT.Nodes.Add("VAC",4,"VAC2","Cálculo")
this.object.LineStyle= 1
this.obJECT.SingleSel= .t.
this.objECT.HotTracking= .t.
Lo que no se es como meter el arreglo en mi Treeview.
Espero me ayuden con su paciencia.
Saludos
Valora esta pregunta


0