nsscroller

How to always visible horizontal scrollbar of NSTableview in objective c programmatically?

喜夏-厌秋 提交于 2020-01-16 07:29:23
问题 I have added NSTableview with multiple columns, I want its horizontal scrollbar should always visible, How to achieve this? 回答1: I create NSScrollview outlet & set in .xib file to superview of NSTableview & used two methods. - setAutohidesScrollers set NO, - setScrollerStyle: set NSScrollerStyleLegacy Set style NSScrollerStyleLegacy meaning is NSSCrollbars background is not transparent. This solved my problem, Hope it will help others. 来源: https://stackoverflow.com/questions/48543845/how-to

Subclassing NSScroller, how to get rid of the white square in the lower right corner?

旧时模样 提交于 2020-01-01 15:57:53
问题 I've created an iTunes like subclass of NSScroller, however if both the horizontal and vertical scrollers are visible in an NSScrollView or NSTableView I'm left with an ugly white square in the lower right corner. Anyone has a clue on where to add my custom drawing to fill that in with something prettier? 回答1: Ok, I think I have the solution(s). Either you tell the scrollview not to draw its background, in that case anything below it will fill the corner. Or, which is what I did, you override

Subclassing NSScroller, how to get rid of the white square in the lower right corner?

梦想的初衷 提交于 2020-01-01 15:57:04
问题 I've created an iTunes like subclass of NSScroller, however if both the horizontal and vertical scrollers are visible in an NSScrollView or NSTableView I'm left with an ugly white square in the lower right corner. Anyone has a clue on where to add my custom drawing to fill that in with something prettier? 回答1: Ok, I think I have the solution(s). Either you tell the scrollview not to draw its background, in that case anything below it will fill the corner. Or, which is what I did, you override

Shrink NSScroller of NSScrollView in layer-backed view

荒凉一梦 提交于 2019-12-24 15:07:28
问题 I'm experiencing a weird problem (Bug?): Say I have a WebView , which will scroll vertically. I now want to shrink the mainFrame 's vertical scroller a little bit, so that its height is smaller than the NSScrollView itself. The reason for this is that I want to pin two views (on top and on bottom edge) above the webview. I did that easily in the frameLoad delegate method by altering the verticalScroller's frame (altering origin and height). It works, but: However once I set the webView and it

How to draw a transparent NSScroller

岁酱吖の 提交于 2019-12-09 13:09:32
问题 I'm subclassing NSScroller to try to make it look similar to how "scrollbars" look on iOS. I want it to just be an overlay representing the current position that is drawn OVER what is under it. For whatever reason if I override drawRect for the scroller, I get the bounds filled with white. Is there any way to prevent this so that way I can just be drawing on top of what my NSScroller sub class is over? Edit: Drawing with clear color seems to bring me close, but it is drawing "too clear" :P It

Overlay NSScroller over content

依然范特西╮ 提交于 2019-12-03 09:57:25
问题 Is there any way to overlay the NSScroller over the content of the scroll view (like in iOS)? I've already tried several approaches: a) setting the frame of the scroll view content view (NSClipView) to extend into the bounds of the scroller b) adding an NSScroller object as a subview of the scroll view (positioned where I want) c) creating an entirely custom scroller view and placing it as a subview (this worked, but that would mean that I need to rewrite all the functionality of NSScroller)

Overlay NSScroller over content

久未见 提交于 2019-12-03 00:28:01
Is there any way to overlay the NSScroller over the content of the scroll view (like in iOS)? I've already tried several approaches: a) setting the frame of the scroll view content view (NSClipView) to extend into the bounds of the scroller b) adding an NSScroller object as a subview of the scroll view (positioned where I want) c) creating an entirely custom scroller view and placing it as a subview (this worked, but that would mean that I need to rewrite all the functionality of NSScroller) Sparrow seems to successfully do this, and it seems to do it through a regular NSScroller subclass