Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

treeview node question

Status
Not open for further replies.

wujen

Programmer
Aug 21, 2001
79
US
hey all,

I have a primary treeview(tvPrime); its nodes(84 them) when clicked will open a new treeview(indexed tvAtt(0) thru tvAtt(83)). the tvPrime is visible on load --all the tvAtt's are not visible.
That part I have not a problem.

The problem is if I click on say tvAtt(3) and then need something on tvAtt(34)-- I can not get the tvAtt(3) to reload.

here is the code:

private from_load()
tvprime.visible = true

end sub

private tvprime_nodeclick(ByVal Node as MScontlib.Node)

Select case node.key
case P1: tvAtt(0).visible = true
case P2: etc
etc
end select

end sub

Any ideas?
Is it possible to make the code like something like
tvatt(lastclicked).visible = true-- how would I get that via tvprime_nodeclick function.

The reasoning that I doing this why is then all the information is internal.(I prefer not to have the application depended on data from databases or files.)

Aaron
 
Not sure I completely understand what it is you are trying to do but my guess is this you are setting the visible property on tvatt(3) to true you then set tvatt(34) to true.
both are now visible but one is probably on top of the other. I think what you need to do prior to seting the next one to visible = true set the visible on all to false

something like
private tvprime_nodeclick(ByVal Node as MScontlib.Node)

for intswitch = 0 to 83
tvatt(intswitch).visible=false
next intswitch

Select case node.key
case P1: tvAtt(0).visible = true
case P2: etc
etc
end select



select case
 
braindead,

okay...yes then i would have to tvAtt with true visible...how would I switch the 1st one to false and have the second one true.

Aaron
 
look at the code example I posted
I did forget to dim intswitch as integer in the example don't forget to do that

As soon as you click a node on tvprime it will set the value of all the tvatt()'s to false. Then based on the node selected it then sets the node selected to true.

it I click the P3 node key it sets it to visible.
next I click the P34 node it sets p3. false and then sets p34 to true. etc etc etc...

Again I dont fully understand what you are doing but if it is what I think then this should work.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top