Can't change column width in response to outlineViewItemDidExpand [closed]

依然范特西╮ 提交于 2020-12-15 03:57:41

问题


I want to update the column width to the width of the widest entry whenever a node in my NSOutlineView is expanded. Thus, my delegate listens to outlineViewItemDidExpand and calls

[column setWidth:maxColumnWidth];

in it. maxColumnWidth is the width of the widest entry.

However, for some reason, calling setWidth from inside outlineViewItemDidExpand doesn't seem to do anything. When I call it later, e.g. as a response to a button click, it works just fine, but from within outlineViewItemDidExpand it just does nothing.

So any idea what I could do to update the column width whenever the user clicks on an expander icon? Thanks!

来源:https://stackoverflow.com/questions/65186668/cant-change-column-width-in-response-to-outlineviewitemdidexpand

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!