I have a NSScrollView, which has NSClipView and vertical/horizontal NSScrollers in it.
Now I want to change the height of the vertical scroller so that it occupies only the top half portion of the scroll view. I can not change the height from the size inspector. I tried changing the frame. It didn't work either.
Can someone help me get through this problem? Thankyou in advance!
Change the height of NSScroller in NSScrollView
245 Views Asked by Tanya Rao At
2
There are 2 best solutions below
0
Klajd Deda
On
Small world.
I ended up cooking a special component for the 8th pure SwiftUI/FRP incarnation of WhatSize.app There are things Swift UI can't really do, so you have to wrap NSView objects as NSViewRepresentable and now they are available to a pure SwiftUI app.
scrollView.scrollerInsets = .init(top: 0.0, left: 0.0, bottom: 14.0, right: 0.0)
So the vertical scroll bars do not stomp over the drag and column resize icon on the bottom in yellow.
This allows WhatSize to display data just as Finder's "as Columns" does.
Related Questions in OBJECTIVE-C
- How to control the volume of an iPhone programmatically in objective-c
- Occasional crash at NSURLSessionDataTask dataTaskWithRequest:completionHandler:
- How to set value the descriptor of iOS BLE in Objective-C?
- Unexpected #selector() Behavior in Swift-Objective-C Interop?
- In what context can we use an unqualified #selector() expression in Swift?
- AVPictureInPictureController crashes during initialization
- How to use pow() in Objective-C?
- How to change the image on the MGSwipeButton in MGSwipeTableCell
- Using sort descriptors in Outline View
- Why is my Swift function not printing from inside the dataTask closure?
- Using UICollectionViewCell with IBOutlet
- Undefined symbol: _OBJC_CLASS_$_ only on simulator
- Why can't I receive a notification sent from Camera Extension(Swift) to an observer application (obj-c++)
- Behavior of __block modifier in objc
- Inserting subview into view where I've added subviews and sublayers
Related Questions in SWIFT
- Navigate after logged in with webservice
- URLSession requesting JSON array from server not working
- When using onDrag in SwiftUI on Mac how can I detect when the dragged object has been released anywhere?
- Protect OpenAI key using Firebase function
- How to correct error: "Cannot convert value of type 'MyType.Type' to expected argument type 'Binding<MyType>'"?
- How to share metadata of an audio url file to a WhatsApp conversation with friends
- Using @Bindable with a Observable type in SwiftUI
- How to make a scroll view of 9 images in a forEach loop open on image 6 if image 6 is clicked on from a grid?
- Using MTLPixelFormat.rgba16Float results in random round-off errors
- Search and highlight text of current text in PDFKit Swift
- How is passing a function as a parameter related to escaping autoclosure?
- Actionable notification api call not working in background
- Custom layout occupies all horizontal space
- Is it possible to fix slow CKAsset loading on Cloudkit?
- Thread 1: Fatal error: Unexpectedly found nil while implicitly unwrapping an Optional value - MapView.isMyLocationEnabled
Related Questions in COCOA
- In what context can we use an unqualified #selector() expression in Swift?
- How can I trigger macOS system gamepad API based on a value received from iOS app through core bluetooth
- Using sort descriptors in Outline View
- NSTableView to NSOutlineView Drag & Drop not accepting drop
- How to remove horizontal line in bottom of section NSTableView?
- CGSRegionRef: How is an arbitrary region represented as union of rects?
- Listen for Touch Events on MacOS (Trackpad)
- Window "yanks" when moving
- Writing NSFilePromiseProviders to pasteboard blocks app on quit
- Basic ImGui program doesn't render, leaks memory and crashes
- NSTokenField suggestion using context menu in swift
- How to link multiple text views to a single text storage in TextKit 2
- I would like to know why I’m not getting IBOutlets connected in an App’s window
- How to make a custom event loop in Cocoa?
- Why is restoreWindow(withIdentifier:state:) called after applicationDidFinishLaunching(_:)?
Related Questions in NSSCROLLVIEW
- Why NSTextView scrolls to bottom when loaded asynchronously?
- Unable to remove left & right borders on NSTableview in an NSScrollView
- How can I ignore all touch events in WKWebView and its enclosingScrolllView
- override NSScrollView "page scroll" behaviour
- NSTextView is blank but mouse over scrollbar makes the content visible
- Detect when NSScrollView can be scrolled
- How to calculate the correct location of a vertical NSRulerMarker?
- Detect mouse wheel -END- event on NSScrollView (AppKit)
- CALayer "floating" within NSScrollView?
- How can I draw vertical text with NSTextView, starting from the right?
- How to prevent jerking and horizontal drift when vertical scrolling in a MacOS NSScrollView
- Resize NSScrollView within superview
- AppKit prevent tracking area updates
- Scrollable NSTextView with custom NSTextStorage for formatting
- Causing a subview to scroll with its superview
Related Questions in NSSCROLLER
- Change the height of NSScroller in NSScrollView
- NSScroller Translucent
- Set NSCollectionview Knob Proportion
- How to make Scroller background transparent in NSScrollView?
- How to always visible horizontal scrollbar of NSTableview in objective c programmatically?
- NSScrollView: Override system display settings?
- How to use NSScroller in a custom NSView
- Scroller's background at NSTableView
- Centering view in scroll view
- NSScroller inside a NSScrollView does not change position when resizing the window (in Swift)
- Detecting Vertical NSScroller hitting bottom in NSTableView
- Discrete (row-by-row) scrolling in NSTextView
- NSTableView infinite scroll or pagination
- How to change NSScroller color?
- NSScroller won't auto-hide and spawns a new NSTableColumn for himself
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular # Hahtags
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?

Since OS X 10.10, NSScrollView has a
scrollerInsetsproperty which should be able to position the scroller differently than the scroll view itself, if wanted.