Results 1 to 4 of 4

Thread: treeview first click issue

  1. #1

    Thread Starter
    Lively Member
    Join Date
    May 2007
    Posts
    70

    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

  2. #2
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    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.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  3. #3

    Thread Starter
    Lively Member
    Join Date
    May 2007
    Posts
    70

    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.

  4. #4
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: treeview first click issue

    Quote Originally Posted by NeoDan View Post
    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.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width