• 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: NSOpenGLView 'moves up' on window resize
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSOpenGLView 'moves up' on window resize


  • Subject: Re: NSOpenGLView 'moves up' on window resize
  • From: Michael Hanna <email@hidden>
  • Date: Sat, 10 Dec 2005 12:23:06 -0800

Well Greg, thank you kindly for taking the time with a detailed response. I followed your instructions. What seems to be happening is that the scroll bars do not appear since the nsoglview inside it seems to be reshaping as if hinged from the bottom. Hence, the interior glview simply expands with the MaxYEdge(creating the 'moving up' effect). I can verify this when I draw a line in the view, then expanding the window, and drawing another line; the y-coordinate increases. Shrinking the window hides the max-y line.

I put my project on my server(with a build product) if you want to see what I mean.

http://siddha.ca/mydownloads/MyCocoaGLProject2DAAcopy.zip

Michael
--
Michael Hanna
email@hidden
iChat: michaelkhanna(AIM)



On 10-Dec-05, at 11:49 AM, Greg Herlihy wrote:

The first step would be to put the the the OpenGL view inside of an NScrollView (with Interface Builder’s "make subview..." of menu command). From your description, it sounds like the scroll bars for the OpenGL view should be visible only when needed. If so, the next step would be to configure the NScrollView to automatically hide its scrollbars, again in Interface Builder. The last step would be to configure the struts and springs for the NSScrollView and the OpenGL view that it contains.

Since the top edge of the NSScroll view is to remain fixed in location, there should be no spring at the edge the view. A strut at the bottom edge, in contrast, permits the base of the NSScrollview resize with the window:

NSScrollView
<image.jpg>


Since the OpenGL is enclosed entirely within an NSScrollView, it can resize to match its superview’s dimensions exactly:
OpenGLView (inside of an NScrollView):

<image.jpg>


Hope this helps,

Greg

On 12/10/05 10:32 AM, "Michael Hanna" <email@hidden> wrote:

> when I resize an nswindow, if I resize it to anything smaller than
> the original size, the contents of the nsopenglview 'move up' past
> the top of the window. I would like it so that a vertical scrollbar
> automatically appear instead.. how do I set that behavior? Currently
> I have NSViewWidthSizable and NSViewHeightSizable set to ON(the
> double-springs in IB).
>
> Michael
>
> --
> Michael Hanna
> email@hidden
> iChat: michaelkhanna(AIM)
>

_______________________________________________
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: 
 >Re: NSOpenGLView 'moves up' on window resize (From: Greg Herlihy <email@hidden>)

  • Prev by Date: Re: NSOpenGLView 'moves up' on window resize
  • Next by Date: setNeedsDisplay oddity?
  • Previous by thread: Re: NSOpenGLView 'moves up' on window resize
  • Next by thread: Custom NSPopUpButton and Cell
  • Index(es):
    • Date
    • Thread