• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: NSScrollView : documentView stuck in the bottom-left corner !
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSScrollView : documentView stuck in the bottom-left corner !


  • Subject: Re: NSScrollView : documentView stuck in the bottom-left corner !
  • From: Eric Morand <email@hidden>
  • Date: Sat, 13 Aug 2005 01:11:05 +0200


Hi again !

i'm back with my question about NSScrollView.

Let me summarize the problem : I want to add a custom view (created and populated with controls in IB) to an NSScrollView, programatically ( as there is no way to doing this correctly in IB) but when I add my custom view to the scroll view (using setDocumentView: ), it remains stuck in the bottom-left corner !


So, I thought that subclassing isFlipped: in my custom viex so that it returns YES would solve the problem. In a way, it did : now my custom view is at the right place...but all my controls are drawn inverted (controls at the top in IB are at the bottom) !!!



I can understand why (the coordinate system is flipped in my custom view), what I don't get is : how can I have a custom view created in IB positioned correctly in a scroll view while keeping the controls at the place where they are in IB ???





Thanks by advance for your help,


Eric.



Le 10 août 05 à 20:06, Eric Morand a écrit :

OK,

Forget about it, I just forgot to subclass isFlipped on my custom class so that it returns YES.



Eric.


Le 10 août 05 à 19:45, Eric Morand a écrit :


Hi list !



I want to programatically create a scroll view and here what I'm using right now :

NSScrollView * scrollView = [[[NSScrollView alloc] init] autorelease];

[scrollView setDrawsBackground:NO];
[scrollView setHasVerticalScroller:YES];
[scrollView setDocumentView:lateralView];
[scrollView setAutoresizingMask:NSViewWidthSizable + NSViewHeightSizable];




lateralView is just a custom NSView that does nothing special (currently, it only fills itself in black for test purpose) but it is stuck in the bottom-left corner of the scroll view ! Very problematic and making my scroll view unusable.



What is the correct way to add a document view to an NSScrollView ? By the way, I don't want to subclass anything else that my custom class. Because standard NSScrollView is used in a lot of standard objects (NSTableView for instance) without subclassing and that it works perfectly. So there IS a solution to have it handle its document view correctly.



Thanks for your help,



Eric.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40mac.com


This email sent to email@hidden





_______________________________________________ Do not post admin requests to the list. They will be ignored. Cocoa-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
References: 
 >NSScrollView : documentView stuck in the bottom-left corner ! (From: Eric Morand <email@hidden>)
 >Re: NSScrollView : documentView stuck in the bottom-left corner ! (Solved) (From: Eric Morand <email@hidden>)

  • Prev by Date: Re: NSTextView and vertical glyphs
  • Next by Date: Calculated Field examples for Core Data
  • Previous by thread: Re: NSScrollView : documentView stuck in the bottom-left corner ! (Solved)
  • Next by thread: Re: NSScrollView : documentView stuck in the bottom-left corner !
  • Index(es):
    • Date
    • Thread