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];
...
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 ...
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. ...
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...
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...
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...
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...
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...
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.
...
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...
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!
...
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...
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)....
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...
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...
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...