掲示板システム
ホーム
アクセス解析
カテゴリ
ログアウト
TreeViewの初期表示を設定するには? (ID:111640)
名前
ホームページ(ブログ、Twitterなど)のURL (省略可)
本文
>また、そのフォルダ以下を全て展開した状態で初期表示したいのです。 再帰処理を使えば簡単に出来ますよ。 Private Sub Command1_Click() ExpandedSubNodes(TreeView1.Nodes.Item(1)) = True End Sub Private Property Let ExpandedSubNodes(ByVal BaseNode As Node, ByVal Expanded As Boolean) If Not BaseNode Is Nothing Then Dim objNode As Node If BaseNode.Children > 0 Then BaseNode.Expanded = True End If Set objNode = BaseNode.Child Do Until objNode Is Nothing ExpandedSubNodes(objNode) = True Set objNode = objNode.Next Loop End If End Property コマンドボタンを押せば全て展開した状態になります。
←解決時は質問者本人がここをチェックしてください。
戻る
掲示板システム
Copyright 2020 Takeshi Okamoto All Rights Reserved.