Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6934213
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T11:55:51+00:00 2026-05-27T11:55:51+00:00

I have a quite big problem, I am really not able to solve myself.

  • 0

I have a quite big problem, I am really not able to solve myself.

The result should look like this:

enter image description here

This image was made with photoshop and is part of the interface I try to build.

In the middle you see something, that should be a list of projects, you should be able to scroll, if it the list is bigger then the view.

So I am making a scrollview like this: (for some reason I cannot do this in the interface builder and want this to work programmatically)

NSScrollView *projectsListView = [[NSScrollView alloc] initWithFrame:NSMakeRect(15, 2, 801, 588)];
[projectsListView setHasVerticalScroller:YES];

Then I create the content view and set a pattern image as backgroundcolor:

NSClipView  *contentView      = [[NSClipView  alloc] initWithFrame:NSMakeRect(0, 0, 
[projectsListView frame].size.width, [projectsListView frame].size.height+(98*2))];
[contentView setBackgroundColor:[NSColor colorWithPatternImage:[NSImage imageNamed:@"BoxLineBackground"]]];
[contentView setDrawsBackground:YES];

Then set the view as document view:

[projectsListView setDocumentView:contentView];

Should work, right?
However the content view gets clipped and looks like this while scrolling:

enter image description here

I tried this to fix it, but it does nothing:

[[projectsListView documentView] setCopiesOnScroll:NO];

I also tried this, but it causes the contentview not to scroll at all.
The image stays the same, but I can move the scroller normally.

[[projectsListView contentView] setCopiesOnScroll:NO];

If I try to set the contentview with setContentView: instead of using setDocumentView:
it may work, but the scroller is gone, so it is also not working correctly.

I would really like to use the patternimage method, because I cannot tell how long the list will be. It depends on the user.

An additional problem then would be to get the whole thing rounded, but that does not matter that much. I tried to use a transparent border image and to overlay the NSScrollView with it using an NSImageView, but again this causes corruption, because it clips and moves the overlaying parts of the image view together with the content of the scrollview.

Anyone having an idea, how to achieve this?

Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T11:55:52+00:00Added an answer on May 27, 2026 at 11:55 am

    I fixed the problem by setting the Background Color on the NSScrollView instead on the NSClipView.

    I though the background would be static in that case and I need to set it for the content view for that reason, but it works pretty well and does scroll together with the content view.

    And thanks for Rob Keniger’s answer. I will probably try this out.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have quite a few RewriteRules in my .htaccess that looks like this RewriteRule
I have quite big document in html format that generated from Microsoft Word. It
I have a quite big XML output from an application. I need to process
We have a git project which has quite a big history. Specifically, early in
I am refurbishing a big CMS that I have been working on for quite
I have quite a problem concerning the use of relational database concepts in Delphi
Hi this question or problem i have its very hard i have search and
I have quite a big network in a CSV file. It containt 450k nodes
I'm doing some math with really big numbers (I'm using Python, but this question
I have a class named DataBoundObject which is quite big. And works good. Its

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.