• 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: NSImageView inside NSScrollView
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSImageView inside NSScrollView


  • Subject: Re: NSImageView inside NSScrollView
  • From: publiclook <email@hidden>
  • Date: Fri, 23 May 2003 13:01:18 -0400

Use Interface Builder's Layout->Make Subviews Of->Scroll View menu item.

When you programmatically create the scroll view, you need to make the scroll view a sub view of some other view or the scroll view can never be displayed.

On Friday, May 23, 2003, at 10:29 AM, Rolf wrote:

Hi,

I have a wide jpeg NSImage in a NSImageView that is much narrower. I need to programatically "slide" the jpeg horizontally inside the NSImageView, pixel by pixel. NSImageView does not seem to have any methods for positioning the NSImage inside itself (except for left/right/center). I
think the solution is to place the NSImageView inside a NSScrollView, turn off its sliders, and use NSScrollView methods for sliding the jpeg back and forth. Am I correct ? I did not find NSScrollView on the palettes pane of IB so I guess it has to be created programatically.
When the following code is run the entire NSImageView (imgSlider) just "vanishes".

NSScrollView *scrollview = [[NSScrollView alloc] initWithFrame:[imgSliding frame]];
[scrollview setDocumentView:imgSliding];

What's wrong ?

/Rolf
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: NSImageView inside NSScrollView
      • From: Rolf <email@hidden>
References: 
 >NSImageView inside NSScrollView (From: Rolf <email@hidden>)

  • Prev by Date: Re: Increasing the number of documents in Recent menu
  • Next by Date: Re: Increasing the number of documents in Recent menu
  • Previous by thread: NSImageView inside NSScrollView
  • Next by thread: Re: NSImageView inside NSScrollView
  • Index(es):
    • Date
    • Thread