DaveS
31 August 2023 21:13
1
a few days ago, Greg0 posted
For anyone looking for a native macOS toolbar, I made one available on the Xojo store recently. You can find more information and a demo link on my website.
Reading time: 1 mins đź•‘
Likes: 8 ❤
A few years ago I had written a basic toolbar control for Swift and Gregs post on TOF inspired me to revisit mine and make it a more robust control.
So if you have a need for a NSToolbar class for Swift let me know.
supports standard toolbar buttons with either/both Images and Text
supports both SPACE and FLEXSPACE items
supports all the system toolbar items (Print, Colors, Font, Cloud etc)
supports grouped controls with either Icons or Text
supports a Searchbar
supports a Dropdown Button type
supports adding almost any macOS Control that is inherited from NSView (which is most of them)
Written in 100% Swift.
1 Like
nice to see alternatives in other languages posted
DaveS
31 August 2023 23:02
3
Newest version supports SF Symbols as well as PNG images for all toolbar icons
this is the same code as above, but with all SF Symbols instead.
DaveS
1 September 2023 23:18
4
I have added a “commandBar” to this package, it is a custom control similar to a NSToolbar, but is icons only. supports the same icon syntax (SF or PNG), and have overflow ability incase the control is not wide enough for all the buttons… It supports “space” and “flexspace” entries, the rounded borders are computed automatically based on the space entry locations
This example attempts to duplicate the similar control in the Xojo IDE using SF. but the icons are not exactly matching
1 Like