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 8338141
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T04:30:05+00:00 2026-06-09T04:30:05+00:00

I custom NSTableView just like what I do in UITableView. I implement the datasource

  • 0

I custom NSTableView just like what I do in UITableView. I implement the datasource and delegate. In the code, I do like this:


- (NSView *)tableView:(NSTableView *)tableView viewForTableColumn:(NSTableColumn *)tableColumn row:(NSInteger)row
{
    ZJCellView *cellView = [tableView makeViewWithIdentifier:cellIdentifier owner:self];
    //this is a custom view
    if (cellView == nil)
    {
        CGRect rect = CGRectMake(0, 0, tableView.frame.size.width, kTableViewCellHeight);
        cellView = [[[ZJCellView alloc] initWithFrame:NSRectFromCGRect(rect)] autorelease];
        cellView.identifier = cellIdentifier;


      // some other controls

    }
    return cellView;

I do the custom just like what I do in iOS.
The problem is there is a line in both left and right border, like:
enter image description here

I tried change the frame of the cell view and it seems to be of no use.
As it is the right way to custom the cell in iOS, I wonder where is it wrong in Cocoa.

Can any body help me?
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-06-09T04:30:06+00:00Added an answer on June 9, 2026 at 4:30 am

    Finally, I find it is the Cell Space which can be set in the nib.

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

Sidebar

Related Questions

in my cocoa application, I need a custom NSCell for an NSTableView. This NSCell
I have a view based NSTableView with a custom NSTableCellView. This custom NSTableCellView has
UITableView custom cell showing weird results? I have my code below. Everything was showing
My custom error messages quit working somewhere along the way and I'm getting this
I have a custom NSTableView subclass filled with several custom NSTextFieldCell subclasses. I would
I'm wondering how one would implement an outline view like the one Xcode 3
I have a view-based NSTableView populated custom NSTabelCellView subclass, which are the lowest objects
I'm trying to set a custom drag icon for use in an NSTableView. Everything
I have an NSTableView embedded within a custom NSScrollView subclass, wherein I sometimes do
I have a NSTableView which contains my custom NSCell subclass, IconCell. The IconCell contains

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.