535 questions
Score of 1
1 answer
76 views
Squeezed width and height of NSButton Appkit
I am trying to create buttons for my player, however, I am getting a squeezed buttons even though I assigned even width and height in appkit NSButtons.
This is the final result I am getting:
private ...
Score of 2
1 answer
364 views
How to achieve "grouped form" styled controls using AppKit?
How does one achieve the "grouped" style controls without SwiftUI, using only AppKit? I've played with combinations of bezel styles and other properties, but cannot get it to fit that style.
...
Score of 0
0 answers
45 views
Can't achieve NSButton behavior like in macOS Quicklook
Quicklook contain this button:
Idle:
Hover:
Active:
Can't achieve it with any settings, closest look I've got is having Idle and Active states, but on hover nothing is happening:
let button = ...
Score of 0
1 answer
117 views
How to give a blue style to a NSButton without having to set a keyEquivalent for it?
I am using this code below for my NSButton, for having the blue style Button. But this code make my Button react to return key on keyboard, which it is not my wish, my goal is having this style ...
Score of 0
1 answer
170 views
NSButton's @objc action not being triggered in Swift for MacOS app
I have an NSButton in my ViewController class that is not triggering its click function (closeButtonPressed) when clicked.
I would test with a Button but UIKit isn't available for my project, as it's ...
Score of 0
0 answers
80 views
macOS 10.12.4 NSButton After adding CAGradientLayer, button title is not displayed
The purpose of the following code is to achieve a gradient background color
In newer versions, it looks fine, but in macOS 10.12.4, the title of the button doesn't appear
- (void)setGradient:(NSArray&...
Score of 0
1 answer
372 views
How to implement a NSButton like the Finder button
Please refer to the screenshot, I want to implement a NSButton like the buttons on Finder window. It seems that the button style is similar with a NSButton recessed. I have tried the recessed button ...
Score of 1
1 answer
167 views
Suppress automatic handling of NSButton radio button groups
I am working on a cross-platform dynamic dialog box builder that runs in macOS and Windows. I have inherited this codebase. I am trying to support radio buttons. The issue is that macOS automatically ...
Score of 0
1 answer
121 views
IBAction for checkbox in NSTableView cell, unexpected sender
I have a cell-based NSTableView that includes a checkbox in the first column. Everything displays and seems to function correctly, except the handling of the checkbox action, which looked like so:
- (...
Score of 0
0 answers
300 views
How to set flat style to NSButton on NSToolbar (to look like NSToolbarItem)
How to set flat style to NSButton on NSToolbar (to look like NSToolbarItem).
For instance, the last toolbar item in the figure (Pointer) should look like other toolbar items. Currently it has border ...
Score of 3
0 answers
202 views
How to add a plus button next to the disclosure button for group row in NSOutlineView?
I would like to add a button next to the disclosure button like in Mail.app.
And I don't want to do it like this in Photos.app.
I had a look at the answers in this question but they are about ...
Score of 0
0 answers
576 views
How to change a button background in Storyboard
Most of my buttons are handled programmatically so they can be easily customized EXCEPT one.
And I haven't figured out how to personalize it's background to a custom theme color.
Score of -1
1 answer
453 views
NSButton: blue background [duplicate]
I want to make my NSButton look like Xcode's commit button
But there doesn't seem to be any way to easily change the background color for a NSButton. You have to change the 'border' to No, then set ...
Score of 0
1 answer
74 views
NSTextField created from custom class appears randomly
I have a main NSView with 2 NSView subviews containing each a custom NSButton (all created in Interface Builder). My custom button class is programmatically creating an NSTextField below the buttons, ...
Score of 0
1 answer
77 views
Swift OS X disable/hide button in view controller if download is in progress from table view in separate classes
I have a table of products and each has a download button. Each button is its own NSTableCellView in a separate class. I want to disable/hide a button in the original Product View Controller class ...