Information générale
Catégorie:
Contrôles ActiveX en VFP
Hi
Tree A and Tree B have same nodes with same key.
Only subnodes for that nodes are diffrent in both the trees.
In the begining only tree A will have subnodes for nodes.
Tree B won't have any subnodes.
User will select subnodes from nodes of tree A, he will also
select node of tree B and then click a button which will add
subnodes to tree B (for selected node of tree B of course)
Name of Tree A is oletree and for B it is oletargettree
if isnull(thisform.oletargettree.selecteditem)
wait wind "Select Node in Target Tree"
retu
endif
t = thisform.oletargettree.selectedItem.text
* targetkey1 is the node selected in the target tree
targetkey1 = thisform.oletargettree.selecteditem.key
sele nodebuild && Temp file which will get populated when
* subnodes are selected in tree A
set filt to nodecheck and whichtree = 1
go top
do while not eof()
thiskey = allt(nodekey) && nodekey is field in the dbf
thistext = allt(nodetext) && nodetext is field in the dbf
thisform.oletargettree.nodes.add(targetkey1,4,thiskey,thistext,,)
thisform.oletree.Nodes.Remove(thiskey)
sele nodebuild
skip
enddo
sele nodebuild
set filt to
go top
zap
thistext = thisform.oletree.selecteditem.text
thisform.oletargettree.nodes.add(targetkey1,4,thiskey,thistext,,)
thisform.oletree.Nodes.Remove(thiskey)
endif
thisform.oletargettree.selecteditem.sorted = .t.
thisform.oletree.refresh
thisform.oletargettree.refresh
Pl. help to solve this problem.
I am getting problem to close the form only if I click the Save button and the node of the target tree has two subnodes.
Thanks in Advance
Ashish Patel
Précédent
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement