Problem controlling a NSScrollView
Problem controlling a NSScrollView
- Subject: Problem controlling a NSScrollView
- From: Anders Sommer Lassen <email@hidden>
- Date: Mon, 21 Jun 2010 16:42:41 +0200
Hi,
I have problem controlling a NSScrollView.
As usual, a custom view is embedded in the scroll view.
>From the user interface, subviews can be added or deleted to the custom view, making it larger or smaller - in height only.
When a subview is added or deleted, the scroll view then decides to show or hide the scrollbar. It is here that my code fails to work properly.
The problem is that when a scroll bar appears, it will use some space in the scroll view. This change in size has to be reflected in the custom view, but it does not.
When adding an item, the custom view do the following:
- adds a subview
- performs a new layout making the custom view larger. This done calling setFrame on the custom view.
And this will make the scrollbar appear (because the custom view is now larger than the scroll view).
How can I get the custom view to known about the change in size due to the newly added scrollbar?
Kind regards,
Anders Lassen
_______________________________________________
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