Re: Icon radio buttons
> On Jan 24, 2018, at 2:25 PM, Casey McDermottwrote: > > Thanks for all the helpful replies. > > Was this list on hiatus for a month? We sent the question Dec 22 and it > was just posted yesterday. I know that I was excessively useless during that time, but I’m not involved with running the list. What I did notice was that there was pretty low traffic over that time period. Did anyone else experience delays in their messages getting delivered? Cheers, Alex Zavatone ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Re: Icon radio buttons
Thanks for all the helpful replies. Was this list on hiatus for a month? We sent the question Dec 22 and it was just posted yesterday. Fortunately, it was not hard to "roll our own". Probably would have needed that anyhow because the buttons respond differently to double-click. Thanks, Casey McD ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Icon radio buttons
You could manage the button state yourself without a lot of code. @IBOutlet var button1: NSButton// tag = 0 ... @IBOutlet var buttonN: NSButton// tag = N - 1 private var selectedPaletteButtonIndex: Int = 0 private var paletteButtons: [NSButton] override func viewDidLoad() { super.viewDidLoad() paletteButtons = [ button1, ... buttonN ] paletteButtons[selectedPaletteButtonIndex].state = .on } @IBAction func paletteChanged(_ button: NSButton) { let newSelectedPaletteButtonIndex = button.tag if selectedPaletteButtonIndex != newSelectedPaletteButtonIndex { paletteButtons[selectedPaletteButtonIndex].state = .off paletteButtons[newSelectedPaletteButtonIndex].state = .on selectedPaletteButtonIndex = newSelectedPaletteButtonIndex } } > On Dec 20, 2017, at 5:04 PM, Casey McDermottwrote: > > Is there a way to have a palette of icon buttons act like radio buttons, > without use of the deprecated NSMatrix? The goal is something like the > drawing tool palette in the Sketch sample app (or ancient MacDraw). > > In IB, it is not possible to add an image to a NSButton with style radio. It > automatically changes to a bevel button when the image is added. Likewise, > with style rectangle, the type can't be radio. > > Thanks, > > Casey McD ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Icon radio buttons
Is there a way to have a palette of icon buttons act like radio buttons, without use of the deprecated NSMatrix? The goal is something like the drawing tool palette in the Sketch sample app (or ancient MacDraw). In IB, it is not possible to add an image to a NSButton with style radio. It automatically changes to a bevel button when the image is added. Likewise, with style rectangle, the type can't be radio. Thanks, Casey McD ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
icon radio buttons, NSToolbar?
I'm trying to get a row of buttons to look and behave like the buttons across the Preview app's preference window. It seems like a nicer way to do a tabbed view. Is that just an NSToolbar with custom graphics/icons, or is that NSMatrix with icon radio buttons? Or is it something else entirely? Thanks, Todd ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: icon radio buttons, NSToolbar?
In cases alike I sometimes find the UIElementInspector application quite helpful to get an idea about which objects make up a view hierarchy. - Peter Am 19.04.2011 um 00:50 schrieb Todd Heberlein: I'm trying to get a row of buttons to look and behave like the buttons across the Preview app's preference window. It seems like a nicer way to do a tabbed view. Is that just an NSToolbar with custom graphics/icons, or is that NSMatrix with icon radio buttons? Or is it something else entirely? Thanks, Todd ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: icon radio buttons, NSToolbar?
See Selectable Toolbar Items in Toolbar Programming Topics. The art is rather out of date so it's not obvious that it's what you're looking for. On Apr 18, 2011, at 3:50 PM, Todd Heberlein wrote: I'm trying to get a row of buttons to look and behave like the buttons across the Preview app's preference window. It seems like a nicer way to do a tabbed view. Is that just an NSToolbar with custom graphics/icons, or is that NSMatrix with icon radio buttons? Or is it something else entirely? Thanks, Todd ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/lrucker%40vmware.com This email sent to lruc...@vmware.com ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com