Centering a view in an NSScrollView

  • Hi,

    I have simple problem, I have custom view within an NSScrollView, but
    it doesn't look very good as it is aligned to the bottom-left of the
    NSScrollView (the custom view can often be small than it's containing
    NSScrollView), is there any way to center it within the NSScrollView?

    Thanks very much in advance

    Moray
    _______________________________________________
    cocoa-dev mailing list | <cocoa-dev...>
    Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
    Do not post admin requests to the list. They will be ignored.
  • Hi Moray.

    > I have simple problem, I have custom view within an NSScrollView, but
    > it doesn't look very good as it is aligned to the bottom-left of the
    > NSScrollView (the custom view can often be small than it's containing
    > NSScrollView), is there any way to center it within the NSScrollView?

    Take a look at:

    http://www.bergdesign.com/missing_cocoa_docs/

    I'm working on a revision of the NSClipView article that I will post on
    CocoaDevCentral in the near future that also touches on two more alternate
    methods along with all their pros and cons, but this should help for now.

    Brock Brandenberg

    ----- industrial design @ www.bergdesign.com ------
    _______________________________________________
    cocoa-dev mailing list | <cocoa-dev...>
    Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
    Do not post admin requests to the list. They will be ignored.
previous month august 2003 next month
MTWTFSS
        1 2 3
4 5 6 7 8 9 10
11 12 13 14 15 16 17
18 19 20 21 22 23 24
25 26 27 28 29 30 31
Go to today