• 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: Demarkation seen on NSScrollView,Why is it?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Demarkation seen on NSScrollView,Why is it?


  • Subject: Re: Demarkation seen on NSScrollView,Why is it?
  • From: "Louis C. Sacha" <email@hidden>
  • Date: Mon, 19 Apr 2004 01:15:49 -0700

Hello...

What is probably happening is that the NSMatrix view is smaller than the size of the content area of the NSScrollView, so the "demarkation" is the edge of your NSMatrix view, and clicks outside that view are going to the scroll view (or its NSClipView).

You can probably fix this by changing the way you resize the matrix view. Instead of just calling sizeToCells, you probably need to do something like the following to make sure that the matrix view is never smaller than area it is supposed to fill:

/* typed in mail, not tested, etc... */

[yourImageMatrix sizeToCells];
NSSize matrixSize = [yourImageMatrix frame].size;
NSSize contentArea = [[yourImageMatrix enclosingScrollView] contentSize];
if (matrixSize.width < contentArea.width) {matrixSize.width = contentArea.width;}
if (matrixSize.height < contentArea.height) {matrixSize.height = contentArea.height;}
[yourImageMatrix setFrameSize:matrixSize];

Hope that helps,

Louis

Hi All,
I have an NSMatrix inside an NSScrollView - this
displays images in a folder. A slider on my window
allows scaling of the images displayed in the
ScrollView.
When the number of images are more i display the
Scrollbars else don't display.
I have set "sizeToCells" on my Matrix so my Scrollbars
work really well. so far so fine.
but when i resize the images or when there is less
number of images displyed in the scrollview, i see a
slight demarkation on my scrollview because of
sizeToCells.
Any click after the demarkation, mouseDown does not
respond (obviously as i have my Matrix responding to
mouseDown and not the Scrollview).
...
In the first place , why am i seeing the demarkation?

Is it a part of the scrollview that is displayed?

Am i doing something wrong?

Thanks.
_______________________________________________
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: Demarkation seen on NSScrollView,Why is it?
      • From: Manish Pattath <email@hidden>
References: 
 >Demarkation seen on NSScrollView,Why is it? (From: Manish Pattath <email@hidden>)

  • Prev by Date: Trouble overriding text editing methods
  • Next by Date: Re: Demarkation seen on NSScrollView,Why is it?
  • Previous by thread: Demarkation seen on NSScrollView,Why is it?
  • Next by thread: Re: Demarkation seen on NSScrollView,Why is it?
  • Index(es):
    • Date
    • Thread