Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Problem using Treeview
Message
De
22/10/2001 06:30:11
Ashish Patel
Hindustan Petroleum
Mumbai, Inde
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Contrôles ActiveX en VFP
Titre:
Problem using Treeview
Divers
Thread ID:
00571571
Message ID:
00571571
Vues:
58
I am having one form which has a treeview named (oletree)

In the nodeclick event I have written the following code.
This code works fine. But when I click on a node which has childrens then
the children's are getting marked. f I click the node again to unselect it, I get the following error.

Fatal Error : Exception Code = C0000005 called from oletree.nodeclick line 17

or the following error message

Prepery not found

2. I also want to know can I write the same code on nodecheck event.
Because the selected property is not available in nodecheck event.
If this is not possible can I make the nodecheck disable so that whenever user
clicks on node programatticallY I will mark or unmark it.

3. Basically I want the user to select multiple records so that when he clicks on abutton (on the form) then the selected records will be populates in another tree and will get deleted from the "oletree". For this I am using the selected records in a dbf file called "Nodebuild"

4. After clicking on node (Which has chield)
IF I click on close button which has the following code

close all
thisform.unload
thisform.release

Nothing happens. Form is not getting closed and I have to close foxpro application by selecting File->Exit.

Pl. Help

Thanks in advance
Ashish Patel
-----------


lparameters node
thisform.oletree.selecteditem.checked = !thisform.oletree.selecteditem.checked
if thisform.oletree.selecteditem.children > 0
pnode = .t. && If Node is a Parent Node
myindex = thisform.oletree.selecteditem.index
else
pnode = .f.
endif


if pnode && Parent Node then capture all its chiedren
loref = thisform.oletree.nodes(myindex).child
do while .t.
if isnull( loref)
exit
else
loref.checked = !loref.checked && Line no 17
rkey = loref.key
rtxt = loref.text

sele nodebuild
seek rkey
if not found()
sele nodebuild
appe blank
replace nodekey with rkey
replace nodetext with rtxt
else
if not loref.checked
dele
else
recall
endif

endif
endif
loref = loref.next
enddo
else
sele nodebuild
seek thisform.oletree.selecteditem.key
if not found()
sele nodebuild
appe blank
replace nodekey with thisform.oletree.selecteditem.key
replace nodetext with thisform.oletree.selecteditem.text
else
if not thisform.oletree.selecteditem.checked
dele
else
recall
endif
endif
endif
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform