gpt4 book ai didi

objective-c - 自定义标题文本并在 NSOutlineview 中显示/隐藏

转载 作者:行者123 更新时间:2023-12-03 16:43:15 24 4
gpt4 key购买 nike

我在源列表模式下使用 NSOutlineView 来显示我的 TreeView 。我需要更改组中标题文本的字体颜色并禁用右侧出现的显示/隐藏按钮。我怎样才能做到这一点?

最佳答案

我不认为可以更改自定义标题的字体颜色。但是,您可以通过对委托(delegate)方法 -outlineView:shouldShowOutlineCellForItem: 响应“否”来禁用显示/隐藏文本。 Apple 示例代码“SidebarDemo”展示了这一点。

https://developer.apple.com/librarY/mac/samplecode/SidebarDemo/Introduction/Intro.html

关于objective-c - 自定义标题文本并在 NSOutlineview 中显示/隐藏,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11184877/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com