nsscrollview

NSScrollView doesn't show scrollbars even although the content is large enough

I have this class: Header: @interface vcMain : NSWindowController { IBOutlet NSView *scroll; } @property (retain) IBOutlet NSView *scroll; -(IBAction)test:(id)sender; @end Source: @implementation vcMain @synthesize scroll; -(IBAction)test:(id)sender { vItem *item = [[vItem alloc] initWithNibName:@"vItem" bundle:nil]; ...

NSScrollview may not respond to '-text'

I am having trouble assigning a NSString to the text of a NSScrollView. I have tried the following: NSString *medium = codeView.text; That didn't work so then I tried: NSString *medium = [codeView text]; This still doesn't work and it gives me the warning: NSScrollview may not respond to '-text' Or in the case of ...

iTunes Song Title Scrolling in Cocoa

I have searched extensively and cannot for the life of me find any information about how to achieve a similar effect to that of the iTunes song title scrolling if the text is too large in Cocoa. I have tried setting the bounds on a NSTextField to no avail. I have tried using NSTextView as well as various attempts at using NSScrollView. ...

Custom NSScroller issues

I'm trying to subclass NSScroller in order to draw my own scroller knob. To do this, I've subclassex NSScrollView and usex the following code to instantiate my custom NSScrollers: - (void)awakeFromNib; { NSRect horizontalScrollerFrame = [[self horizontalScroller] frame]; NSRect verticalScrollerFrame = [[self verticalScroller] fr...

Custom NSScrollers having weird effect from Core Animation

Hi everyone, I am making custom NSScrollers for use in NSScrollView. But when any of the superviews of the NSScroller gets Core Animation enabled. I get this drawing issue that's a huge nuisance. Whenever i scroll into the corners of the scroll view the scrollers clip. But if a scroller starts out drawing in the corner, the scroller part...

How to remove square drawn around window resize handle in an NSScrollview?

I have an NSScrollview that takes up an entire window. The scrollview has a vertical scrollbar but no horizontal scrollbar. The window color is gray. The window is resizable. Cocoa automatically draws a white square with a light gray border around the window's resize handle (right below the bottom of the vertical scroller). I would li...

NSView -scaleUnitSquareToSize leaves view blank until it's resized despite -setNeedsDisplay message

I used this guide: http://developer.apple.com/mac/library/qa/qa2004/qa1346.html to implement scaling in a special view. The scaled view is the document view of an NSScrollView. The problem is that when I call -scaleUnitSquareToSize, then call -setNeedsDisplay:YES (I also tried -setNeedsDisplay:YES on the scroll view), the view (not the...

Pinning NSScrollView's document view while resizing a window

This seems like such a trivial question to ask, but it's been vexing me for a while. I have a window which contains a scroll view. Typically, the scroll view has a documentView that is vertically larger than the clip view, so you get a vertical scroller to see all the content inside the scroll view. When I resize the window, I recalcu...

How to fill the right bottom corner of NSScrollView?

I want to change its color, but I'm not sure wether to subclass NSScrollView or NSClipView. Or if the corner can be inserted as a regular NSView. I don't need code. Just a hint at how to do it. ...

how to stop NSScrollView from scrolling on resize?

I'm writing a PDFViewer for a 3rd party PDF library. I have a subclass of NSScrollView and a subclass of NSView. The problem is the NSScrollView will scroll up and down when I resize window. here is the relevant code: whenever windows is resized, my subclass of NSScrollView receive this message: -(void)handleFrameChange:(NSNotificatio...

NSScrollView -- Not showing blue button scroll bar when < 4 rows?

Cocoa isn't rendering the blue scroll button unless my scroll view is 4 rows long. Does anyone know how to show the scroll bar button when the scroll view is only two rows? Thanks! ...

Padding around an NSTextView in an NSScrollView

I'd like to provide a few pixels of padding around an NSTextView inside of an NSScrollView. I've reviewed this post and using setTextContainerInset does the trick for the left, right, and bottom margins. But as soon as the text scrolls the top buffer is lost. Same thing with overriding textContainerOrigin. Another answer in that post sta...

How should I wrap a custom NSView in an NSScrollView?

Hey stackoverflow, Cocoa's NSScrollView is horribly under-explained. I hope someone here knows what it's all about and can spare me a few seconds. So I have a custom NSView. I implement -drawRect: for it to draw something, fill itself with colour, whatever. Then I have an NSScrollView wrapping it (set up through the interface Builder)....

removeFromSuperview crashes when called on UIScrollView and UIScrollView crashes when scrolling past the right end.

Hello. In my program I have this code: @try{ if (online_scores_pages != nil){ NSLog(@"Here - %@",online_scores_pages); }else{ NSLog(@"NIL"); } [online_scores_pages removeFromSuperview]; NSLog(@"Here 2"); [self becomeFirstResponder]; NSLog(@"Here 3"); section = CURLING_MENU; }@catch (NS...

How do I adjust the scrollers in a newly opened document?

Hey guys, I’m writing a document-based Cocoa application with a custom view that does the whole presentation of the document to the user. I finally got scrolling to work, and it feels great. When I open a previously saved document, though, the scrollers remain blank and useless until I resize the window — even if the document view’s f...

Orient Scrollers without changing window size? Frustration.

Hello! I'm writing a document-based app. The main document view is a custom view (NSView subclass). This resides in a Scroll View and the accompanying ClipView, created through IB. Scrolling works. The user can move objects around on the main view, and when they go off the edges the custom view adjusts it's frame-size and autoscrolls to...