Re: Scrollbar doesn't initially update
Re: Scrollbar doesn't initially update
- Subject: Re: Scrollbar doesn't initially update
- From: Christopher Corbell <email@hidden>
- Date: Wed, 16 Jul 2003 15:49:10 -0700
On Tuesday, July 15, 2003, at 03:26 PM, Alastair J.Houghton wrote:
On Tuesday, July 15, 2003, at 09:59 pm, Christopher Corbell wrote:
How can one force an NSScrollView to update itself based on
changed size of its document view?
Normally it happens automatically.
I have an NSTableView inside an NSScrollView, defined in a nib.
When it's loaded, the entire view is programatically resized (it's
in a drawer) and the table is programatically populated by its
data source.
That's odd. When I resize the document view of an NSScrollView by
sending a setFrame: message to its document view, the scroll bar
updates just fine. How are you resizing your document view?
Regards,
Alastair.
The resizing is invoked automatically by bindings, because the
ultimate container of the NSScrollView is an NSDrawer. The drawer is
resized to match the parent window.
Actually though I think it's not so much the resizing as the populating
of the
table that's failing to update the scroller. (In the nib file the
table doesn't
have any contents, so the scrollbar is rightly invalid in the IB UI).
I've overridden -reloadData and inserted the call that Johness suggested
(reflectScrolledClipView). This seems to fix it. Too bad NSTableView
doesn't do this automatically (it could just do so if the NSView method
enclosingScrollView returns an object)....
Thanks for the help.
- Christopher
_______________________________________________
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.