Re: Demarkation seen on NSScrollView,Why is it?
Re: Demarkation seen on NSScrollView,Why is it?
- Subject: Re: Demarkation seen on NSScrollView,Why is it?
- From: Manish Pattath <email@hidden>
- Date: Mon, 19 Apr 2004 10:12:36 +0100 (BST)
Hi Louis,
Thanks a lot for the reply.
I must say, it sort of solved my problem:)),but
introduced some more:((
- on scaling [to the smallest size] of images, my
button cells change from square shape to rectangle to
fit the content area's height of the scrollview!!.
- i don't resize the width of image on scaling.
at the biggest image size,there is one coloumn in the
matrix and one buttonCell of the matrix displaying the
image which occupies just about 1/2 of the width of
the scrollview.With the change in code,at largest
size, the buttonCell occupies the entire ScrollView.
Any help regarding this would be of very great help.
Thanks again.
--- "Louis C. Sacha" <email@hidden> wrote: >
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.
________________________________________________________________________
Yahoo! India Matrimony: Find your partner online.
http://yahoo.shaadi.com/india-matrimony/
_______________________________________________
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.