获取NSScroller的滚动条位置 [英] Get scroll bar position of an NSScroller on the fly

查看:448
本文介绍了获取NSScroller的滚动条位置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

紫色矩形是 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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆