Questions tagged [nssplitview]

An NSSplitView object stacks several subviews within one view so that the user can change their relative sizes. By default, the split bars between the views are horizontal, so the views are one on top of the other.

An NSSplitView object stacks several subviews within one view so that the user can change their relative sizes. By default, the split bars between the views are horizontal, so the views are one on top of the other.

Divider indices are zero-based, with the topmost (in horizontal split views) or leftmost (vertical) divider having an index of 0.

The NSSplitViewDelegate protocol defines the optional methods implemented by delegates of NSSplitView objects.

158 questions
1
vote
1 answer

cocoa NSTableView in CustomView in SplitView size don't adjust

I have a NSSplitView as my "Superview". In this SplitView is a Custom View with a NSTableView. I'm try to load my Custom View from a Controller class and then adjust the size of the custom view and the Table. But the table and or the custom view…
Togo
  • 172
  • 8
1
vote
0 answers

NSSplitView Controller: how to move from one viewcontroller to another programmatically

I'm new to mac development. I've used NSSplitView to divide my view. when I select the field from the left side of split view, the selected view has been displayed on the right side of split view. Now the problem is that when I press an button on…
user1838670
  • 81
  • 10
0
votes
1 answer

Detect which NSTableView is active

I have an NSSplitView showing two NSTableView instances. I need to detect which table view has become "active" (of focused), which means the one that the user has clicked. I need to know that because each table view acts as a source list for another…
jeanlain
  • 382
  • 1
  • 3
  • 13
0
votes
1 answer

Strange behavior on splitView:(NSSplitView *)splitView resizeSubviewsWithOldSize:(NSSize)oldSize in os x Lion

I'm building an application with two split views (one split view in side right split view) But i'm having problems after upgrading to OS X Lion. The application crashes when you use the lower right resize action, ie change the height and width at…
0
votes
0 answers

Why my NSSplitViewItem hides its subviews before collapse is done

I'm trying to setup a simple and common layout in Interface Builder: a splitview with a side bar (left) and a content view, which itself holds a splitview with a content view (left) and a sidebar (right). Both side bars should collapse when reaching…
C. Hubert
  • 3
  • 2
0
votes
1 answer

Placing the NSSplitView in the NSPageController and toggling the sidebar, the display is broken

PageViewController is placed in SplitViewController and TextView is turned into a page. Consecutive switching will break the size of the pageview or TextView. AutoResizingMask on all views in the story board. Is there any way to solve this…
llscsrl
  • 59
  • 6
0
votes
2 answers

Is it possible in a NSSplitView to temporarily disable the mouse cursor change when hovering on the separator?

I am developing a macOS application, and I have a subclassed NSSplitView that I sometime completely disable by reducing its alphaValue, as the following happens in the subclass: override func hitTest(_ point: NSPoint) -> NSView? { if…
Alfonso Tesauro
  • 1,730
  • 13
  • 21
0
votes
1 answer

Making Inspector Sidebar in macOS Window

I would like to make an "inspector sidebar" in a macOS window. You know the inspector in Xcode: The sidebar's content should be context sensitive. Depending on the user's selection in the main window there should be different dialogs. Which…
Michael
  • 51
  • 1
  • 8
0
votes
1 answer

NSSplitView screen artefacts

I'm buildng an app for macOS with an NSSplitView. In the top frame of the splitview, there is another NSSplitView, this time vertical, to make a three-pane window. (Two frames across the top, one frame across the bottom, a bit like FCP etc.) It…
Kenny
  • 1,083
  • 2
  • 8
  • 23
0
votes
1 answer

NSOutlineView badges in NSSplitView

I have an NSOutlineView which I draw badge numbers to the right side of cells using drawAtPoint:, NSAttributedString, and of course NSBezierPath. My problem exists when resizing of the outline view occurs when within a subview of an NSSplitView. The…
Marc
  • 1
  • 1
0
votes
1 answer

How can I use Auto Layout in a subview of an NSSplitView?

My question is a duplicate of this question asked 4 years ago, but it was never answered. I have an NSSplitView with two subviews. The right subview has a label I want to center horizontally and vertically. The basic skeleton looks like this: let…
Bryan
  • 193
  • 7
0
votes
2 answers

NSSplitViewController doesn't collapse when created from a Storyboard

I am trying to mimick the behaviour of apps like Notes and Contacts, where when I resize the window the left split view item collapses. I can't recreate this behaviour when using a Storyboard. If I create the NSSplitViewController in code this works…
user7946504
0
votes
1 answer

Detect active NSSplitViewItem

I have a SplitView with (several) SplitViewItems. Echt SplitViewItem has a ViewController with multiple views in it. I need to detect which of the SplitViewItems has the focus of the user. For example: if the user clicks on any control/view (or…
Johannes
  • 307
  • 2
  • 11
0
votes
0 answers

How do I reset NSSplitView views

This is a little hard to explain, but I will try my best. This is how I setup my NSSplitView inside my mainWindow. [self.splitView.subviews[0] addSubview:view0]; [self.splitView.subviews[1] addSubview:view1]; [self.splitView.subviews[2]…
Curt Rand
  • 1,025
  • 1
  • 9
  • 27
0
votes
1 answer

NSApp.sendAction() only works after some time

I want a ViewController (ContainerVC) to react on clicks on child custom views (ChildView). In ChildView I override mouseDown(_:) to handle the click. In this method I try to call the ContainerVC target via…
mic
  • 907
  • 6
  • 17