treeview first click issue
Hi all,
Been a while since I posted but I've come across a problem with a treeview control I've loaded with data.
Every time the treeview is refreshed all the branches are collapsed. This is ok... except the first time you click anywhere on the control (doesn't have to be on the root node), the control seems to do a proper refresh and reveals that the root node actually isn't collapsed...
It's really just cosmetic... but it becomes an irritant when you go to click on the root node thinking it's collapsed and you get the behaviour where it instaneously refreshes to it's uncollapsed form but the your click actually collapsed the node back to just the root node.
Anybody else seen this behaviour? I found a similar isue reported outside this forum but nobody posted a solution there.
Hoping it's a different case in here.
Cheers
Re: treeview first click issue
This is an issue with a control and nothing to do with actual database development so does not belong in the Database Development forum. I will ask the mods to move this thread but the destination depends on the type of TreeView. Is it WinForms and, if not, what is it?
If it is WinForms, you could try calling the Refresh method after populating it but, if that doesn't work, maybe post the code you're using to populate it so that we can try to replicate the issue.
Re: treeview first click issue
No problems with the move. I only put it in here because I am building the treeview ina form in Access 2013.
In any case I've tried the refresh method. still has the same effect.
However, I notice now that it may have something to do with the getfocus method? When running the code from the vb screen and then clicking anywhere on the form, the treeview shows the children of the root nodes.
Ruuuuunning the code from a button on the form keeps the children hidden until youclick anywhere on the control.
Re: treeview first click issue
Quote:
Originally Posted by
NeoDan
No problems with the move. I only put it in here because I am building the treeview ina form in Access 2013.
In that case, it probably does belong here, although it might be better of in Office Development. Either way, you really ought to specify that sort of thing at the outset, because people generally won't guess it.