treeview

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

this is what i have written while builiding the treeview i already have and i
need to go deeper..

'------------------START---------------------------------
'Loop thru Requirement Types
For Each objReq In objBaseline.Requirements
'DoEvents ' Allow for a break, so user can cancel
Set objNode = TreeView1.Nodes.Add()
Set objNode.parent =
TreeView1.Nodes("RequirementTypes" & "-" & objProject.Name & "-" &
objBaseline.Name & "-" & objReqType.Name)
objNode.Text = objReq.Name
objNode.Image = "Type"
Set objNode.Tag = objReq
objNode.Key = "Type" & "-" & objProject.Name & "-" &
objBaseline.Name & "-" & objReqType.Name & "-" & objReq.Name 'Has to be Unique
'objNode.parent.Expanded = False 'Collapse the
Baseline Nodes
'objNode.parent.parent.Expanded = False 'Collapse
the Project Nodes
Next objReq

'---------------------END---------------------------------------

Iam getting an error at "Set objNode.parent" saying object not found. why
wud that be?

thank you
 
Hi amruta,

This looks suspiciously like VB6 code... Is it? If so, you may get better
help in the microsoft.public.vb.* newsgroups.

--
Tom Spink

this is what i have written while builiding the treeview i already have
and i need to go deeper..

<snippedy-doo-dah>
 
it must be, he's using the old "key" property in the old treeview from VB6,
which doesnt exist anymore in .NET
 
it must be, he's using the old "key" property in the old treeview from
VB6, which doesnt exist anymore in .NET
<snippedy-doo-dah>

Heh, just noticed that old beast. :-)

In that case, he should change this:

///
Set objNode.parent = TreeView1.Nodes("RequirementTypes" & "-" &
objProject.Name & "-" & objBaseline.Name & "-" & objReqType.Name)
///

To this:

///
Set objNode.parent = TreeView1.Nodes("Type" & "-" & objProject.Name & "-" &
objBaseline.Name & "-" & objReqType.Name)
///

And it *might* work.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top