开发者

How do I hide all columns in a treelistitem?

I'm using the HyperTreeList to display a list of items with the name in the first column, and a "Rem开发者_StackOverflow中文版ove" button in the second column. I wrote a function to filter what is displayed in the tree by some text in a TextCtrl. To hide the TreeListItems, I'm doing this:

treelist.HideItem(branch, True)

where treelist is a HyperTreeList and branch is a TreeListItem. The first column hides just fine, but none of the buttons in the second column hide. How do I get all columns in a TreeListItem to hide?


According to the docs, this should work:

treelist.SetColumnShown(column_index, False)

but this will hide that column for everything. If I understand what you're saying, the row you are trying to hide doesn't actually disappear, just the value of the first column. In that case, you might have to refresh the widget with treelist.Update() to get the rest of the row to disappear.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜