Hakan,
I think you have to modify Class TTreeView at source/classes/treeview.prg as per Mr.Antonio's Instruction in this thread. Please see the Mr.Antonio's first reply in this thread.
Regards
Anser
Hakan,
I think you have to modify Class TTreeView at source/classes/treeview.prg as per Mr.Antonio's Instruction in this thread. Please see the Mr.Antonio's first reply in this thread.
Regards
Anser
Hakan,
yes, some changes are required.
We are still testing them.
Thanks anser,
I have the latest version of FWH. I thought changes that you mentioned included the 8.10.
Hakan,
We have added a new clause ... TREEVIEW ... CHECKBOX and also some new methods in Class TTVItem, but we are still testing them.
If you want to test them, we can provide you the changes.
Antonio,
I can wait it.
Thanks,
Antonio Linares wrote:Gustavo,
test.prg
#include "FiveWin.ch" function Main() local oDlg, oTree DEFINE DIALOG oDlg @ 0, 0 TREEVIEW oTree OF oDlg SIZE 200, 200 CHECKBOXES ACTIVATE DIALOG oDlg CENTERED ON INIT definirTree( oTree ) MsgInfo( oTree:GetCheck( oTree:aItems[ 1 ] ) ) return nil function definirTree(oTree) local oMenu := array(3), ; oSubMenu := array(10) oMenu[1]:= oTree:Add( "Principal" ) oSubMenu[1]:= oMenu[1]:Add( "Imprimir..." ) oMenu[2]:= oTree:Add( "Proyectos" ) oSubMenu[6]:= oMenu[2]:Add( "Definir Proyectos" ) oSubmenu[7]:= oMenu[2]:Add( "Actualización datos" ) oTree:expand() return nil
Antonio Linares wrote:Gustavo,
test.prg
#include "FiveWin.ch" function Main() local oDlg, oTree DEFINE DIALOG oDlg @ 0, 0 TREEVIEW oTree OF oDlg SIZE 200, 200 CHECKBOXES ACTIVATE DIALOG oDlg CENTERED ON INIT definirTree( oTree ) MsgInfo( oTree:GetCheck( oTree:aItems[ 1 ] ) ) return nil function definirTree(oTree) local oMenu := array(3), ; oSubMenu := array(10) oMenu[1]:= oTree:Add( "Principal" ) oSubMenu[1]:= oMenu[1]:Add( "Imprimir..." ) oMenu[2]:= oTree:Add( "Proyectos" ) oSubMenu[6]:= oMenu[2]:Add( "Definir Proyectos" ) oSubmenu[7]:= oMenu[2]:Add( "Actualización datos" ) oTree:expand() return nil

Júlio,
Will you show us how you did it?
Regards,
James
Gustavo,
Cuando el checkbox "padre" es seleccionado, los checkboxes de las ramas hijas no se seleccionan automaticamente. Eso hay que hacerlo via programación.
When the parent checkbox is set, the childs checkboxes are not set automatically. You have to code such behavior.
James Bott wrote:Júlio,
Will you show us how you did it?
Regards,
James
Antonio Linares wrote:Gustavo,
Cuando el checkbox "padre" es seleccionado, los checkboxes de las ramas hijas no se seleccionan automaticamente. Eso hay que hacerlo via programación.
When the parent checkbox is set, the childs checkboxes are not set automatically. You have to code such behavior.
So friends,
About my question? It's not possible?
Gustavo,
It seems as Windows API doesn't do it automatically, so we have to code it.
PROCEDURE checkTreeView( oItemTree, lComplete, lCheckComplete )
LOCAL oObjTree, oObjItem
LOCAL nPos := 0
DEFAULT lComplete := NIL, ;
lCheckComplete := NIL
oObjTree := iif( valType( oItemTree ) == "O" .AND. upper( oItemTree:className() ) == "TTREEVIEW", oItemTree, oItemTree:oTree )
IF !isNull( lComplete )
FOR nPos := 1 TO len( oObjTree:aItems )
oObjItem := oObjTree:aItems[nPos]
IF !isEmpty( oObjItem:aItems )
checkTreeView( oObjItem,, lComplete )
ELSE
oObjTree:setCheck( oObjItem, lComplete )
ENDIF
NEXT
ELSE
oObjTree:setCheck( oItemTree, iif( !isNull( lCheckComplete ), lCheckComplete, !oObjTree:getCheck( oItemTree ) ) )
FOR nPos := 1 TO len( oItemTree:aItems )
oObjItem := oItemTree:aItems[nPos]
IF !isEmpty( oObjItem:aItems )
checkTreeView( oObjItem,, lCheckComplete )
ELSE
oObjTree:setCheck( oObjItem, iif( !isNull( lCheckComplete ), lCheckComplete, !oObjTree:getCheck( oObjItem ) ) )
ENDIF
NEXT
ENDIF
RETURN( NIL )