掲示板システム
ホーム
アクセス解析
カテゴリ
ログアウト
CLRでツリービューのノードを描画するには (ID:67655)
名前
ホームページ(ブログ、Twitterなど)のURL (省略可)
本文
で、こいつを一般化すると、だ。 array<String^>^ data = { "ナミヘイ", "→", "サザエ", "→", "タラ", "←", "カツオ", "ワカメ", }; TreeNode^ current = nullptr; TreeNode^ node; for each ( String^ text in data ) { if ( text == "→" ) { current = node; } else if ( text == "←" ) { current = current->Parent; } else { node = gcnew TreeNode(text); if ( current == nullptr ) treeView1->Nodes->Add(node); else current->Nodes->Add(node); } }
←解決時は質問者本人がここをチェックしてください。
更新する
戻る
掲示板システム
Copyright 2021 Takeshi Okamoto All Rights Reserved.