Questions tagged [nsscrollview]

Apple OS X Developer API : NSScrollView class is the central coordinator for the Application Kit’s scrolling machinery

548 questions
48
votes
6 answers

Callbacks When an NSScrollView is Scrolled?

I'm making a Mac app which needs to know when the user is scrolling the NSScrollView, however, I can't find any methods like UIScrollView, which has the following delegate methods: – scrollViewDidScroll: – scrollViewWillBeginDragging: –…
nonamelive
  • 6,510
  • 8
  • 40
  • 47
31
votes
3 answers

contentsize and contentOffset equivalent in NSScroll view

I am porting an app from Ipad to mac. (I know that it sounds weird) I stuck with NSScrollview. Please guide me contentsize , contentOffset equivalent in NSScrollview.
shakthi
  • 1,597
  • 2
  • 17
  • 29
25
votes
4 answers

How to make NSTableView scroll to most recently added row?

I'm dynamically adding rows to an NSTableView. When I issue [table reloadData] I can see the scroll view move and if I move it by hand I can see the new value on the table. But how can I scroll it automatically?
ruipacheco
  • 15,025
  • 19
  • 82
  • 138
16
votes
1 answer

How to call NSScrollView autoscroll-method programmatically

I have simple chat application with text messages view-based NSTableView as you can see at the picture below. Each message contains NSTextView instance having height to fit all the text. All I need is to start NSScrollView (which…
Daniyar
  • 2,975
  • 2
  • 26
  • 39
16
votes
4 answers

How do you get NSScrollView to center the document view in 10.9 and later?

There are lots of examples out there of how to get NSScrollView to center its document view. Here are two examples (which are so similar that somebody is copying somebody without attribution, but the point of how is…
uchuugaka
  • 12,679
  • 6
  • 37
  • 55
16
votes
1 answer

Automatically grow document view of NSScrollView using auto layout?

Is there a simple way to get an NSScrollView to adapt to its document view changing size when using auto layout? I have tried to call both setNeedsUpdateConstraints: and setNeedsLayout: on the document view, the clip view and the scroll view,…
Monolo
  • 18,205
  • 17
  • 69
  • 103
15
votes
1 answer

How to set the content size of NSScrollView?

I am new to Mac OSX Programming. I have created on iOS apps in which I can set The content size of UISCrollView by using contentSize property. But there is no such property I found for Mac Apps. How it can be done and how can I enable the scrolling…
Developer
  • 6,375
  • 12
  • 58
  • 92
15
votes
1 answer

Stop NSScrollView only on specific values - Like UIScrollView paging

I am working on a Mac OS X app using SDK 10.7 as deployment target. A NSScrollView contains a horizontal list of image thumbnails. The thumbnail which is in the center of the ScrollView indicates the selected image which is shown below the…
Andrei Herford
  • 17,570
  • 19
  • 91
  • 225
15
votes
3 answers

How to maintain the scroll position in NSScrollView when changing scale?

I've got an NSView (myView) wrapped in an NSScrollView (myScrollView). Using zoom-in/out buttons, the user can alter the scale of myView. If the user is currently scrolled to a particular spot in myView, I'd like to keep that part of the view…
Olie
  • 24,597
  • 18
  • 99
  • 131
14
votes
1 answer

OSX/Cocoa - NSScrollView with transparent background

I can't seem to create a NSScrollView with a transparent background. Does anyone know why? here is my code: NSScrollView *textScroll = [[NSScrollView alloc] initWithFrame:CGRectMake(212, 203, 381, 55)]; [textScroll setBackgroundColor:[NSColor…
Zigglzworth
  • 6,645
  • 9
  • 68
  • 107
13
votes
6 answers

Hide scrollers while leaving scrolling itself enabled in NSScrollView

I'd like to hide the NSScrollers of NSScrollView. I'm aware of the methods setHasHorizontalScroller: and setHasVerticalScroller:. However, if I disable the scrollers, scrolling in that direction gets disabled as well. I'd like to only hide the…
mplappert
  • 1,314
  • 11
  • 18
13
votes
3 answers

How I set the default position of a NSScroll view?

I have a trouble with a NSScrollview in my aplication because it always start at the bottom of the window. How could make it start in the top?
Javier Beltrán
  • 756
  • 5
  • 26
13
votes
1 answer

How to Do a contentInset on a NSScrollView on a Mac

I am trying to do a contentInset on an NSScrollView the same way as iOS in a UIScrollView. There is no method to do this though. Is there anyway to achieve this? this picture should describe what I am trying to do: If anyone knows of a solution I…
foobar5512
  • 2,470
  • 5
  • 36
  • 52
13
votes
4 answers

Create NSScrollView Programmatically in an NSView - Cocoa

I have an NSView class which takes care of a Custom View created in the nib file. Now I want to add an NSScrollView to the custom view, but I need to do it programmatically and not using Interface Builder (Embed Into Scroll View). I have found this…
Kevin
  • 1,469
  • 2
  • 19
  • 28
12
votes
5 answers

Soft scroll animation NSScrollView scrollToPoint:

I want to create soft animation between transitions in simply UI: view that moved When a call scrollToPoint: for move view to point that transition doesn't animate. I'm newbe in Cocoa programming (iOS is my background). And I don't know how right…
WINSergey
  • 1,977
  • 27
  • 39
1
2 3
36 37