Click to See Complete Forum and Search --> : Not working "twnChild" in VBScript??


illario
September 16th, 2002, 01:37 AM
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?

Surrendermonkey
September 16th, 2002, 04:19 AM
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.

illario
September 16th, 2002, 05:07 AM
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?

Surrendermonkey
September 16th, 2002, 09:09 AM
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,

illario
September 17th, 2002, 01:55 AM
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))

Surrendermonkey
September 17th, 2002, 03:44 AM
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")

illario
September 17th, 2002, 04:13 AM
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.