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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T02:04:00+00:00 2026-05-28T02:04:00+00:00

As discussed elsewhere, NSTabView does not have a setBackgroundColor method and subclassing NSTabView and

  • 0

As discussed elsewhere, NSTabView does not have a setBackgroundColor method and subclassing NSTabView and using an drawRect to control it does no longer work – as it does not paint the top 10%, the bit just below the segmented control button.

Now I am a bit surprised by the amounts of work arounds I had to do solving this; see

  • code: https://github.com/dirkx/CustomizableTabView/blob/master/CustomizableTabView/CustomizableTabView.m

and am wondering if i went down the wrong path. And how to do this better & simpler:

  • The NSSegmentStyleTexturedSquare seems to yield me a semi-transparent segmented Control. Which means I need to do extra work to hide any bezel lines (line 240, 253).

    • is there a better way to do this ? I.e. negate its transparency ?

    • or is there a way I can use the actual/original segmented choise button ?

  • I find that the colours I need – like the [NSColor windowBackgroundColour] are not set to anything useful (i.e. that one is transparent) — so right now I hardcode them (lines 87, 94).

    • Is there a better way to do this ?
  • I find I need a boatload of fluffy methods to keep things in sync ( line 128, 134, etc).

    • can this be avoided ?
  • I find that mimicking the cleverness on rescaling means I need to keep a constant eye on the segemented Control box and remove/resize it. And even then – it is not quite as good as the original

    • is there a better way to do this than line 157 — i.e. hear about resizing ? Rather than do it all the time ?
  • The segementControl fades dark when focus is removed from the window – unlike the real McCoy.

    • can that easily be prevented ? is there a cheap way to track this ?
  • Or is this the wrong approach – and should I focus on just a transparent hole here – and let the NSTabViewItem draw a background ? But in any case – then I still have the issue with the Segemented COntrol box – or is there than a way to make that be the default again.

    • when trying this – I get stuck on the top 20-30 pixels being drawn in the ‘real’ windows background colour – which is ‘transparent’ – and hence the colour will not run all the way to the top or behind the segment bar and up to the bezel – but instead stop some 8 pixels below the bottom of the segment controls.

Feedback appreciated – as this feels so far off/suboptimal for such a simple things —
Thanks a lot. Brownie points for hacking/forking the github code 🙂 🙂 🙂 As a line of running code says more than a thousand words.

Dw.

  • 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-28T02:04:01+00:00Added an answer on May 28, 2026 at 2:04 am

    PSMTabBarControl is probably the best workaround for you. I have created several custom tab views, but cocoa does not play well with this control. PSMTabBarControl has been updated to support Xcode 4. https://github.com/ciaran/psmtabbarcontrol

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

Sidebar

Related Questions

I have the often discussed drawRect not getting called. I've been through many posts,
This might be discussed elsewhere but I can't find it. I have a .Net
So we've discussed logging in passing at my place of work and I was
Object-relational mapping has been well discussed, including on here. I have experience with a
Okay, so I'm not a Java guy, but I work with loads of them.
I've seen discussed the MVC project structure using a UI Project and a Code
I have an InstallShield (InstallScript) installation, created using IS2009, that's built automatically every night,
I have seen it discussed somewhere that the following code results in obj being
This problem probably has been discussed, but this one is slightly different. I'm using
I know this has been discussed ad nauseum...but I have an issue with the

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.