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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T14:24:39+00:00 2026-06-11T14:24:39+00:00

In Interface Builder you can set the style of a button to Check to

  • 0

In Interface Builder you can set the style of a button to “Check” to turn it into a checkbox, and you can set the style of a button in code using NSButton’s setButtonStyle: method, but how can I determine at runtime whether a particular NSButton is a checkbox (or radio button, or regular push button, etc)?

Part of the project I am working on requires loading views from other bundles and there is special behaviour required for each checkbox (these bundles are from 3rd parties).

  • 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-11T14:24:40+00:00Added an answer on June 11, 2026 at 2:24 pm

    I’m not sure there’s a foolproof way to do this. You can check the bezelStyle, and for a checkbox that logs 2 (NSRegularSquareBezelStyle). I don’t know if there are other buttons that have the NSRegularSquareBezelStyle, that are not check boxes. You’ll probably have to experiment to find this out.

    After Edit : I did find one other button that logs 2 for bezelStyle (the bevel button), but you can log [button.cell showsStateBy], and the check box was the only one I found that logs 1.

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

Sidebar

Related Questions

How can I set label's border which is dynamically generated (Not from Interface Builder)?
I have created a button in interface builder and set its type as custom.
How can I enter RGB or Hex color values for backgrounds in Interface Builder?
When I create UITextField inside Interface Builder, I can access Events tab for it,
How can we internationalize the placeholder property's value of a UITextField in interface builder-attribute
I made a Text Field with interface builder. How can I get its text
I added a UISlider in interface builder in my iOS application. Can I make
I've added a number of labels to a view using Interface Builder. I've also
There are times when I set things in Interface builder and they show up
Is it possible to set a selector for setDoubleAction through Interface Builder or it

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.