METHOD MenuPop( nRow, nCol )
LOCAL oMenu
LOCAL oItem := ::oTree:hitTest( nRow, nCol )
IF ( oItem != NIL )
Menu oMenu POPUP
IF ( ::nHitemCortar ) == 0
IF ( oItem:hItem != ::nIdRaiz )
MenuItem "Cortar" ACTION ::accionesArbol( VK_INSERT, oItem )
ENDIF
ELSE
MenuItem "Pegar aquí..." ACTION ::accionesArbol( VK_RETURN, oItem )
ENDIF
EndMenu
ACTIVATE POPUP oMenu At nRow, nCol OF ::oTree
ENDIF
RETURN ( NIL )
//------------------------------------------------------------------------------
METHOD accionesArbol( nOpcion, oItem )
CASE nOpcion == VK_INSERT // cortar
::oItemCortar := oItem
endcase
return (nil)
LOCAL oItem:= ::oItemCortar
local nTotalItems:= 0
::oTree:scan( { | oItem | nTotalItems++,.F. } )
msginfo(nTotalItems)
METHOD Count() CLASS TTreeView
local nItems := 0, bAction := { | oItem | nItems++, .F. }
::Scan( bAction )
return nItems
METHOD Count() CLASS TTVItem
local oItem, nItems := 1
for each oItem in ::aItems
nItems += 1 + If( ! Empty( oItem:aItems ), ( oItem:Count() - 1 ), 0 )
next
return nItems
method count()...
classs TTVItem
METHOD Count() CLASS TTVItem
? oTree:getselected():count()
Time from start: 0 hours 0 mins 1 secs
Error occurred at: 04/22/22, 07:55:45
Error description: Error BASE/1004 No exported method: COUNT
Args:
[ 1] = U
Return to FiveWin para Harbour/xHarbour
Users browsing this forum: No registered users and 108 guests