CPScrollView and Interface Builder

32 views
Skip to first unread message

david.ri...@enquora.com

unread,
Jun 27, 2017, 10:42:31 PM6/27/17
to Cappuccino & Objective-J
I am instantiating a number of CPViewController subclasses with associated Cibs (created using Interface Builder), fetching their views and dynamically setting the contentView of a CPWindow to be one of the loaded views.

When loading a view with a CPScrollView as the top-level view in the Cib, the scroll bars containers are visible, but not the scroll bars. Resizing the view manually when the app opens the window does not show scroll bars.

I have manually enabled the scrollers in Interface Builder, made the scrollers always visible and disabled Auto-layout.
The xib top-level views with scroll views were made by dragging out the NSScrollView palette item, putting a custom subview in the Clip View, and adding controls to the subview.

Is there anything obvious I'm doing incorrectly in Interface Builder to visually design a view that requires scrolling functionality?

d.

Martin Carlberg

unread,
Jun 28, 2017, 2:48:55 AM6/28/17
to objec...@googlegroups.com
Hi David,

Du you have any pictures on how this looks? A pictures tells more than 1000….  😃

If possible, a small test app demonstrate this problem would also help a lot to figure out the problem,

- Martin

--
You received this message because you are subscribed to the Google Groups "Cappuccino & Objective-J" group.
To unsubscribe from this group and stop receiving emails from it, send an email to objectivej+...@googlegroups.com.
To post to this group, send email to objec...@googlegroups.com.
Visit this group at https://groups.google.com/group/objectivej.
For more options, visit https://groups.google.com/d/optout.

david.ri...@enquora.com

unread,
Jun 28, 2017, 10:39:49 AM6/28/17
to Cappuccino & Objective-J
Du you have any pictures on how this looks? A pictures tells more than 1000….  😃
   Window sized to clip content view - visible scrollbars expected:
  
    Window sized to display entire content view:
 
 
If possible, a small test app demonstrate this problem would also help a lot to figure out the problem,
Creating Objective-J and Objective-C examples from scratch now - will take some time.

d. 

Keary Suska

unread,
Jun 28, 2017, 11:58:28 AM6/28/17
to objec...@googlegroups.com
By any chance have you logged the dimensions of the clip view and the custom view to ensure that the custom view is indeed larger than the clip view?

I have found that capp makes unfortunate choices about the positioning and layout of embedded views, especially boxes and tab views, so I tend to add them manually when the view loads. This might help as well.

> On Jun 28, 2017, at 8:39 AM, david.ri...@enquora.com wrote:
>
>
> Du you have any pictures on how this looks? A pictures tells more than 1000…. 😃
> Window sized to clip content view - visible scrollbars expected:
>
>
> Window sized to display entire content view:
>
>
> If possible, a small test app demonstrate this problem would also help a lot to figure out the problem,
> Creating Objective-J and Objective-C examples from scratch now - will take some time.


Keary Suska
Esoteritech, Inc.
"Demystifying technology for your home or business"

david.ri...@enquora.com

unread,
Jun 28, 2017, 4:53:12 PM6/28/17
to Cappuccino & Objective-J, cappu...@esoteritech.com


On Wednesday, June 28, 2017 at 9:58:28 AM UTC-6, Keary Suska wrote:
By any chance have you logged the dimensions of the clip view and the custom view to ensure that the custom view is indeed larger than the clip view?

I have found that capp makes unfortunate choices about the positioning and layout of embedded views, especially  boxes and tab views, so I tend to add them manually when the view loads. This might help as well.

I have now linked a bare CPScrollView to the view controller's view property, put the detail controls in a separate view in the xib and manually set the scroll view's documentView to that detailView. Scrolling is now functional. Automatic sizing of the detail view to match the window is off, but that seems easier to deal with.

I'm still unclear on the problem/solution for using a single view hierarchy in the xib, but that is a problem for another day.
Reply all
Reply to author
Forward
0 new messages