How do I make a TreeNode not visible? (C#)

后端 未结 4 851
慢半拍i
慢半拍i 2021-01-19 05:57

There is probably a really straightforward answer to this but I\'m having difficulty finding it.

Simple, I have a TreeNode and I would like to make its visibility fa

4条回答
  •  旧时难觅i
    2021-01-19 06:27

    Hmm... I originally (and incorrectly) mentioned IsVisible. However, on inspection I expect the answer is simply: don't add it until you need it.

    This is easier if your UI model is an abstraction above your actual data model, so you can store items in the data model regardless of their visibility, and simply update the UI (add/remove/update nodes) as necessary.

提交回复
热议问题