¦U¦ì¤Ó¤Ó¦n.
¥»¤H¦bUserform «Ø¥ß¤F¤@ÓTreeView, ¤Î¤@Ó Textbox1.
²{¦bTreeView1ªº¥N½X¤v¸g©w¸q¦n¤F,¦ý§Ú·Q·í§ÚÂIÀ»¤l¥Ø¿ý®É, textbox1.value¥i¥H¥X²{¤l¥Ø¿ýªº¦WºÙ.
½Ð°Ý§Ú¸Ó¦p¦ó°µ©O?
§Ú¶}©l¥H¬°³o¼Ë´N¥i¥H..¦ý³ø¿ù..,½Ð«ü±Ð.
Private Sub TreeView1_Click()
TextBox1.Value = Treeview1.item.value.
End Sub
Private Sub UserForm_Initialize()
Dim nodX As Node
With Me.TreeView1
With .Nodes
.Add , , "L1", "Root"
.Add "L1", tvwChild, "L11", "1"
.Add "L1", tvwChild, "L12", "2"
.Add "L11", tvwChild, "L111", "3"
.Add "L12", tvwChild, "L121", "4"
.Add "L12", tvwChild, "L122", "5"
' .Add , , "L2", "Stanley"
.Item("L122").EnsureVisible
.Item("L111").EnsureVisible
End With
.Style = tvwTreelinesPlusMinusText
End With
End Sub |