CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 7 of 7
  1. #1
    Join Date
    Sep 2002
    Posts
    9

    Not working "twnChild" in VBScript??

    Hello to all !
    I have included to my HTML page a MS TreeView Control.
    And when i wanted to add some nodes to it, using VBScript:
    .....................
    myNode=TreeView1.Nodes.Add("A",twnChild,"AA","[1.1]")
    ....................
    Not working flag "twnChild". And all nodes goes to zero level as simple ListBox.
    It strange? becouse pure VB can add nodes into different nodes.
    How can i fix my problem?

  2. #2
    Join Date
    Sep 1999
    Location
    Leeds U.K. (Proud to be Sheffield Born)
    Posts
    202

    Constants

    Have you ensured that the declaration of the constant twnChild is included in your code?

    Try myNode=TreeView1.Nodes.Add("A",4,"AA","[1.1]")

    and see what happens.

  3. #3
    Join Date
    Sep 2002
    Posts
    9

    Great,All working with "4" BUT....

    Hi, SurenderMonkey, thanks for your help,
    All woks great,
    But i have another one question for you:
    I have HTML page with 2 view devided by the splitter.
    On my left view i have TreeView control, and on my right view a simple HTML page.
    How i can resize my TreeView Control during resizing my Left View of framed HTML Page?

    Problem in that metods like: TreeView1.height,width,left,right not working.

    How fix this problem?

  4. #4
    Join Date
    Sep 1999
    Location
    Leeds U.K. (Proud to be Sheffield Born)
    Posts
    202

    Wrong problem.

    please post your code. This works for me no problem.

    with id="trvw" (or whatever) in your <Object ...> tag, try

    document.all.trvw.width = document.body.clientWidth - 20;

    Cheers,

  5. #5
    Join Date
    Sep 2002
    Posts
    9

    Re: Wrong problem.

    Mr. Surrendermonkey
    Thanks for your help, but i have solved my problem in different way.
    The problem was in word type : VBScript not understand "height",
    but he undestand "Height" with big "H"/
    My new now is code simple:
    TreeView1.Height="100%"
    TreeView1.Widht="100%"

    Exactly need to write % symbol.

    Question:
    How can i load new page(*.htm) on my right frame using VBScript?
    ((On my left frame is TreeView Control))

  6. #6
    Join Date
    Sep 1999
    Location
    Leeds U.K. (Proud to be Sheffield Born)
    Posts
    202

    Simple

    Your frames page probably looks something like this:

    <html>

    <head>
    <title>Frames</title>
    </head>

    <frameset cols="220,*">
    <frame name="contents" target="main" src="Tree.htm">
    <frame name="main" src="OtherThing.htm">
    <noframes>
    <body>
    <p>You don't have frame support.
    </body>
    </noframes>
    </frameset>
    </html>

    In which case, either of these will do the job:
    window.parent("main").navigate("http://www.codeguru.com")
    window.parent.main.navigate("http://www.codeguru.com")

  7. #7
    Join Date
    Sep 2002
    Posts
    9

    Re: Simple

    Thank sfor code, i have solved this probem using this code:

    Private Sub TreeView1_NodeClick(ByVal Node)
    window.open "myhtml.htm","right"
    End Sub

    Personal Question ///: Where are you from?
    Do you know Russian Language?
    I from Russia.

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