Results 1 to 5 of 5

Thread: Loop height of treeview

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Apr 2009
    Posts
    364

    Loop height of treeview

    Hi there,
    is there any possible to loop height of a treeview? I would like to fit the height of a main window application to the height of a treeview.

    Regards.

    VB6

  2. #2
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: Loop height of treeview

    Not quite sure what you mean, but maybe something like
    Code:
    Treeview1.Height = Me.Height

  3. #3

    Thread Starter
    Hyperactive Member
    Join Date
    Apr 2009
    Posts
    364

    Re: Loop height of treeview

    Thanks hack. Maybe You know the effect like auto resizing of height? For example if the main window goes to full screen, tree view inside also auto resizing its height. Just like in the Visual Basic ( project sample window ). Height of a tree view, and the main application are connected together all the time ( looping or something ).

  4. #4
    Fanatic Member
    Join Date
    Mar 2009
    Posts
    804

    Re: Loop height of treeview

    Perhaps you are referring to the reentrancy problem in Resize?
    If so, try this:

    Code:
    Private Sub Form_Resize()
     Static Busy As Boolean 'retains value across calls
     If Busy Then Exit Sub
     Busy = True
     Height = TreeView1.Height
     Busy = False
    End Sub

  5. #5

    Thread Starter
    Hyperactive Member
    Join Date
    Apr 2009
    Posts
    364

    Re: Loop height of treeview

    Thanks VB, not exactly. I'm referring to something like that:

    Code:
    Private Sub Form_Resize() 
       Me.TreeView1.Move 0, 0, ScaleWidth, ScaleHeight
    End Sub
    When I changing the main window size ( for example height ), at the same time treeview should also changing its size. Above code is only the clue what I found in VB forum but I suppose there is some little more advanced.

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