by goosfancito » Mon Oct 27, 2008 1:54 pm
Funciona, gracias.
JC wrote:Gustavo,
This procedure can do it!
- Code: Select all Expand view
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 )
-
goosfancito
-
- Posts: 1954
- Joined: Fri Oct 07, 2005 7:08 pm
Return to FiveWin for Harbour/xHarbour
Who is online
Users browsing this forum: Google [Bot], MSNbot Media and 87 guests