获取NSScroller的滚动条位置 [英] Get scroll bar position of an NSScroller on the fly
问题描述
紫色矩形是 NSView
。在其 awakeFromNib
方法中,我调用 [[NSViewController alloc] initWithNibName:@nibbundle:nil]]
/ p>
红色矩形是 NSScrollView
aka @nib
。此视图包括垂直滚动条。
绿色框是一个 NSBox
nib,由 NSCollectionViewItem
。
滚动列表时,如何观察和获取滚动条旋钮的位置(即拖动旋钮)?
感谢您的帮助:)
>完全重复,答案与此处相同:如何检测NSOutlineView的滚动?
The purple rectangle is an NSView
. In its awakeFromNib
method I call [[NSViewController alloc] initWithNibName:@"nib" bundle:nil]]
.
The red rectangle is an NSScrollView
aka @"nib"
. This view includes the vertical scroll bar.
The green box is an NSBox
nib which is selected by NSCollectionViewItem
.
How would one observe and get the scroll bar knob's position on the fly when scrolling through a list (i.e. while dragging the knob)?
Thanks for the help :)
While not an exact duplicate, the answer is the same as the one found here: How to detect scrolling for NSOutlineView?
这篇关于获取NSScroller的滚动条位置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!