CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4
  1. #1
    Join Date
    Feb 2008
    Posts
    3

    Load tab control using treeview childnode

    Hi,

    I am in desperate of help. I am a new user working with visual basic .net 2005. My interface is made from treeview control and tab control.

    The big question here is how do I load the tab control using the treeview control child node. Can anyone give me a sample coding or appropriate instruction. I reading books and searching the whole internet and I can't find a solution for this.

    Help Help!!

  2. #2
    Join Date
    Jul 2006
    Location
    Germany
    Posts
    3,725

    Re: Load tab control using treeview childnode

    Please explain in more detail.
    What is the treeview data? Is it folders on disk or other data?
    How do you want to fill a Tab control???
    If you want to display data you need a ListBox or maybe even a ListView control, which you have to place in a tab of your Tab control.
    If you tell more we can advise you better.

  3. #3
    Join Date
    Feb 2008
    Posts
    3

    Re: Load tab control using treeview childnode

    Hi,

    I have a treeview control on my form with a list of tree nodes created on the left hand side of the interface. On the right hand is the tab control with current properties visibility set to false. I want to load the tab control upon selecting a child node of the tree.

    On the tab control there will be textbox and buttons for users to enter their data.

    I found the following code from this website but I am having problem running it...

    Private Sub TreeView1_AfterSelect(ByVal sender As System.Object, ByVal e As System.Windows.Forms.TreeViewEventArgs) Handles TreeView1.AfterSelect
    Dim node As TreeNode = CType(sender, Windows.Forms.TreeView).SelectedNode
    If node = ???? Then
    TabControl1.Visible = True
    End If
    End Sub

    The child node name is 'Enter/Adjust Customer' when i put this in the program there is error of overload resolution. I know I have miss out stuff but clearly I am clueless as I am new to programming.

    Please help...

  4. #4
    Join Date
    Jul 2006
    Location
    Germany
    Posts
    3,725

    Re: Load tab control using treeview childnode

    Ok. First thing i see is If node = 'text of the node' does not work
    I don't have the IDE available now, but I'd say
    If node.text = "Enter/Adjust Customer" then...
    The expression node does not by default resolve into the text property of the node. You have to specify node.text explicitly.

    Maybe there is still more to it. I can try later today.

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

Featured