Problems with TreeControl

  • Thread starter Thread starter David C. Holley
  • Start date Start date
D

David C. Holley

I've implemented my first TreeControl, however something strange is
happening. When I try to expand a node, immediately after loading the
form (and the TreeControl), the FIRST node is expanded. The TreeControl
is three-levels deep: MONTHS, DATES, TRANSPORTS. So, if I click on
DECEMBER to expand it, JANUARY is expanded. Everything seems to work
fine after the first click.

Any ideas as to why?
 
Hi David,
if you do not have any code under expanded event - then only idea i have
that you load treeview in open form event, but you have to use load form's
event

HTH
 
Only form-level code is tied to the onLoad event. Only control-level
code is tied to ExplorerPane_NodeClick. I've tried expanding the tree
without the _NodeClick code, but the issue still persists.
 
don't think so.
if you like - you can send me your form with treeview and code, i will try
to find what is wrong there.
email you can find on my web site
 
Sent. The data's been scrubbed down to remove critical information, but
you should still be able to get a feel for it. I did notice that the
problem also occurs when the FIRST node (January) is clicked as well.
 
Hi David,
this is because SinlgeSel property - as soon as you TV get focus - some node
get selected and exapanded. You can either set SinlgeSel to false, or make
one node selected after treeview load
HTH
 
Back
Top