• 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
Problem with NSScrollView and scroll bars
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Problem with NSScrollView and scroll bars


  • Subject: Problem with NSScrollView and scroll bars
  • From: Leanne Attard <email@hidden>
  • Date: Fri, 30 Mar 2012 23:53:46 -0700 (PDT)

I am quite a newbie in Cocoa and any help would be appreciated. I am currently doing the main application in java and the drawing in opengl.  In order to do this I used the cocoa nsview being given by JAWT (java) and added my custom view (Nativeview) to this view.  Then i created an NSOpenGLContext and did the drawing using OpenGL calls such that the drawing is done natively.  The problem now is that when in java i open up a window with size larger than the screen, then scroll bars occur with the window however they are not working properly. I have the coordiante system in opengl changed using glOrtho so that the top left corner is (0,0).  However the drawing is being made on the window such that my view seems to be pinned at the bottom and the (0,0) for my drawing occurs out above the window.  Also when i move the scroll bars no change is being seen, i.e it seems that there is a missing link between my Nativeview and the scroll bars.  Does anyone has an
 idea what am I missing?  I tried to use this:

ads_subview //my custom NSView
avo_winparent //NSView instance given from JAWT

[avo_winparent addSubview:ads_subview];

NSScrollView* adsl_scrollview = [ads_subview enclosingScrollView];
[adsl_scrollview setDocumentView:avo_winparent];
[[avo_winparent window] setContentView:adsl_scrollview];


However this made no difference thus I concluded that the document view  and content view are already set when the NScrollView is created.

Thanks for your help
Leanne Attard
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Prev by Date: Re: drawRect using a Category
  • Next by Date: Audio question
  • Previous by thread: Re: drawRect using a Category
  • Next by thread: Audio question
  • Index(es):
    • Date
    • Thread