开发者

Source list groups hidden by default

开发者 https://www.devze.com 2023-04-09 11:10 出处:网络
In Lion, source list group items now have a Hide/Show button that appears when the mouse rolls over the item. My problem is that all my groups are initially hidden, and I have to click \"Show\" to see

In Lion, source list group items now have a Hide/Show button that appears when the mouse rolls over the item. My problem is that all my groups are initially hidden, and I have to click "Show" to see their contents. How do I make them shown by default?

(I'm开发者_运维问答 using a view-based outline view, if that matters)

Relevant code is at https://github.com/Uncommon/Hugbit/commit/9356cf619befdfd5e81d7e0a54f528abf624c0b7


The only way I've found is to specifically call -expandItem: for each group row's item in the -windowDidLoad method.


I ended up finding the solution myself.

The problem is that I'm loading some of the sidebar content asynchronously. When the outline view sees groups that are initially empty, it also makes them initially collapsed.

The key is to wait until all my sidebar items are loaded, and then expand the groups.

0

精彩评论

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