#35 ✓resolved
Bob Warwick

CPScrollView resizes on first scroll

Reported by Bob Warwick | September 12th, 2008 @ 10:58 PM | in 0.5.2

When I create a basic scroll view with code like this:

var scrollView = [[CPScrollView alloc] initWithFrame:CPRectMake(0, 0, 500, 150)];
var docView = [[CPView alloc] initWithFrame:CPRectMake(0, 0, 500, 300)];
[scrollView setDocumentView:docView];
[scrollView setHasHorizontalScroller:NO];
[[self contentView] addSubview:scrollView];

the CPScrollView adjusts it's height when I start scrolling. The change in height appears to be equal to the size of the horizontal scroller.

If I swap the setDocumentView: and setHasHorizontalScroller: call however, it works as expected without resizing.

var scrollView = [[CPScrollView alloc] initWithFrame:CPRectMake(0, 0, 500, 150)];
var docView = [[CPView alloc] initWithFrame:CPRectMake(0, 0, 500, 300)];
[scrollView setHasHorizontalScroller:NO];
[scrollView setDocumentView:docView];
[[self contentView] addSubview:scrollView];

Comments and changes to this ticket

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

The Cappuccino Web Framework, including AppKit, Foundation, and Objective-J.

Shared Ticket Bins

Referenced by

Pages